m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 00:03:39 -05:00

Add --margin option

Close #299
This commit is contained in:
Junegunn Choi
2015-07-26 23:02:04 +09:00
parent 2bebddefc0
commit ee0c8a2635
6 changed files with 196 additions and 36 deletions

View File

@@ -731,6 +731,18 @@ class TestGoFZF < TestBase
tmux.prepare
end
def test_margin
tmux.send_keys "yes | head -1000 | #{fzf "--margin 5,3"}", :Enter
tmux.until { |lines| lines[4] == '' && lines[5] == ' y' }
tmux.send_keys :Enter
end
def test_margin_reverse
tmux.send_keys "seq 1000 | #{fzf "--margin 7,5 --reverse"}", :Enter
tmux.until { |lines| lines[1 + 7] == ' 1000/1000' }
tmux.send_keys :Enter
end
private
def writelines path, lines
File.unlink path while File.exists? path