diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2025-03-23 11:06:18 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2025-03-23 11:13:21 +0900 |
| commit | 82fd88339b115f1159d66588191990d95fb41e88 (patch) | |
| tree | 8aa1bd5e178b943fb168c3f62f50b33ceb7a38f1 /test | |
| parent | de0f2efbfb34b4545bde5cc64cf819c2e3be963e (diff) | |
| download | fzf-82fd88339b115f1159d66588191990d95fb41e88.tar.gz | |
Fix offset-middle not updating the list
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_core.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_core.rb b/test/test_core.rb index 32fbd2cf..235fe52a 100644 --- a/test/test_core.rb +++ b/test/test_core.rb @@ -1846,4 +1846,14 @@ class TestCore < TestInteractive assert_includes lines, 'X Type in query ... Y100/100' end end + + def test_offset_middle + tmux.send_keys %(seq 1000 | #{FZF} --sync --no-input --reverse --height 5 --scroll-off 0 --bind space:offset-middle), :Enter + line = nil + tmux.until { |lines| line = lines.index('> 1') } + tmux.send_keys :PgDn + tmux.until { |lines| assert_includes lines[line + 4], "> 5" } + tmux.send_keys :Space + tmux.until { |lines| assert_includes lines[line + 2], "> 5" } + end end |
