mirror of
https://github.com/junegunn/fzf.git
synced 2025-07-26 09:42:02 -07:00
Fix offset-middle not updating the list
This commit is contained in:
@@ -5486,6 +5486,7 @@ func (t *Terminal) Loop() error {
|
||||
t.scrollOff = t.window.Height()
|
||||
t.constrain()
|
||||
t.scrollOff = soff
|
||||
req(reqList)
|
||||
case actJump:
|
||||
t.jumping = jumpEnabled
|
||||
req(reqJump)
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user