Skip to content

Commit

Permalink
Avoid full redraw on 'preview' action when preview window exists
Browse files Browse the repository at this point in the history
  • Loading branch information
junegunn committed Feb 1, 2024
1 parent d373cf8 commit 1416e69
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/terminal.go
Original file line number Diff line number Diff line change
Expand Up @@ -3490,7 +3490,9 @@ func (t *Terminal) Loop() {
t.prompt, t.promptLen = t.parsePrompt(a.a)
req(reqPrompt)
case actPreview:
updatePreviewWindow(true)
if !t.hasPreviewWindow() {
updatePreviewWindow(true)
}
refreshPreview(a.a)
case actRefreshPreview:
refreshPreview(t.previewOpts.command)
Expand Down

0 comments on commit 1416e69

Please sign in to comment.