diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2024-09-12 22:04:19 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2024-09-12 22:04:19 +0900 |
| commit | 2191a44e36216791623cb166cc45f7a66f0bda34 (patch) | |
| tree | 293d760e6664b547eac9f554efc76b7371b9feec | |
| parent | 952276dc2dcdd5401be804b4417d0cb392e2eda8 (diff) | |
| download | fzf-2191a44e36216791623cb166cc45f7a66f0bda34.tar.gz | |
Redraw/hide scroll offset when 'info' property is changed
| -rw-r--r-- | src/options.go | 2 | ||||
| -rwxr-xr-x | test/test_go.rb | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/options.go b/src/options.go index 67e70a70..62c8c0c3 100644 --- a/src/options.go +++ b/src/options.go @@ -387,7 +387,7 @@ func (a previewOpts) sameLayout(b previewOpts) bool { } func (a previewOpts) sameContentLayout(b previewOpts) bool { - return a.wrap == b.wrap && a.headerLines == b.headerLines + return a.wrap == b.wrap && a.headerLines == b.headerLines && a.info == b.info } func firstLine(s string) string { diff --git a/test/test_go.rb b/test/test_go.rb index 1860ac1a..8f627baf 100755 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -3381,11 +3381,16 @@ class TestGoFZF < TestBase def test_preview_window_noinfo # │ 1 ││ - tmux.send_keys %(#{FZF} --preview 'seq 1000' --preview-window top,noinfo --scrollbar), :Enter + tmux.send_keys %(#{FZF} --preview 'seq 1000' --preview-window top,noinfo --scrollbar --bind space:change-preview-window:info), :Enter tmux.until do |lines| assert lines[1]&.start_with?('│ 1') assert lines[1]&.end_with?(' ││') end + tmux.send_keys :Space + tmux.until do |lines| + assert lines[1]&.start_with?('│ 1') + assert lines[1]&.end_with?('1000││') + end end end |
