Avoid full redraw on 'preview' action when preview window exists

This commit is contained in:
Junegunn Choi 2024-02-01 15:50:48 +09:00
parent d373cf89c7
commit 1416e696b1
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627
1 changed files with 3 additions and 1 deletions

View File

@ -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)