mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-12-23 11:29:01 +00:00
Avoid unnecessary redraw of the preview window
This commit is contained in:
parent
f39ab3875e
commit
8d2fcd3518
@ -1652,9 +1652,12 @@ func (t *Terminal) Loop() {
|
||||
}
|
||||
}
|
||||
scrollPreview := func(amount int) {
|
||||
t.previewer.offset = util.Constrain(
|
||||
newOffset := util.Constrain(
|
||||
t.previewer.offset+amount, 0, t.previewer.lines-1)
|
||||
req(reqPreviewRefresh)
|
||||
if t.previewer.offset != newOffset {
|
||||
t.previewer.offset = newOffset
|
||||
req(reqPreviewRefresh)
|
||||
}
|
||||
}
|
||||
for key, ret := range t.expect {
|
||||
if keyMatch(key, event) {
|
||||
|
Loading…
Reference in New Issue
Block a user