summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/terminal.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/terminal.go b/src/terminal.go
index 14dcd28f..02fe7317 100644
--- a/src/terminal.go
+++ b/src/terminal.go
@@ -796,6 +796,9 @@ func numLinesMax(str string, max int) int {
}
func (t *Terminal) printPreview() {
+ if !t.isPreviewEnabled() {
+ return
+ }
t.pwindow.Erase()
skip := t.previewer.offset
extractColor(t.previewer.text, nil, func(str string, ansi *ansiState) bool {
@@ -839,9 +842,7 @@ func (t *Terminal) printAll() {
t.printPrompt()
t.printInfo()
t.printHeader()
- if t.isPreviewEnabled() {
- t.printPreview()
- }
+ t.printPreview()
}
func (t *Terminal) refresh() {