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

View File

@ -3490,7 +3490,9 @@ func (t *Terminal) Loop() {
t.prompt, t.promptLen = t.parsePrompt(a.a)
req(reqPrompt)
case actPreview:
if !t.hasPreviewWindow() {
updatePreviewWindow(true)
}
refreshPreview(a.a)
case actRefreshPreview:
refreshPreview(t.previewOpts.command)