Skip to content
Myr

Avoid unnecessary redraw of the preview window

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent f39ab38 · Browse files · 1 file+5 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−2 removed

  • other:+5 added−2 removed

1 file+5 added−2 removed

modified:src/terminal.go+5 added-2 removed
1650 unmodified lines
1651 req(reqInfo)1652 }1653 }1654 scrollPreview := func(amount int) {1655 t.previewer.offset = util.Constrain(1655 newOffset := util.Constrain(1656 t.previewer.offset+amount, 0, t.previewer.lines-1)1657 if t.previewer.offset != newOffset {1658 t.previewer.offset = newOffset1657 req(reqPreviewRefresh)1659 req(reqPreviewRefresh)1660 }1661 }1662 for key, ret := range t.expect {1663 if keyMatch(key, event) {1664 t.pressed = ret
407 unmodified lines