mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-01 04:32:05 -07:00
Add toggle-hscroll
This commit is contained in:
@@ -1442,10 +1442,14 @@ class TestGoFZF < TestBase
|
||||
writelines(['=' * 10_000 + '0123456789'])
|
||||
[0, 3, 6].each do |off|
|
||||
tmux.prepare
|
||||
tmux.send_keys "#{FZF} --hscroll-off=#{off} -q 0 < #{tempname}", :Enter
|
||||
tmux.send_keys "#{FZF} --hscroll-off=#{off} -q 0 --bind space:toggle-hscroll < #{tempname}", :Enter
|
||||
tmux.until { |lines| assert lines[-3]&.end_with?((0..off).to_a.join + '··') }
|
||||
tmux.send_keys '9'
|
||||
tmux.until { |lines| assert lines[-3]&.end_with?('789') }
|
||||
tmux.send_keys :Space
|
||||
tmux.until { |lines| assert lines[-3]&.end_with?('=··') }
|
||||
tmux.send_keys :Space
|
||||
tmux.until { |lines| assert lines[-3]&.end_with?('789') }
|
||||
tmux.send_keys :Enter
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user