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

Export FZF_PREVIEW_LINES and FZF_PREVIEW_COLUMNS to preview process

fzf will still override LINES and COLUMNS as before but they may not
hold the correct values depending on the default shell.

Close #1314
This commit is contained in:
Junegunn Choi
2019-02-22 14:33:29 +09:00
parent 6c32148f90
commit 8dc1377efb
3 changed files with 12 additions and 6 deletions

View File

@@ -1371,7 +1371,7 @@ class TestGoFZF < TestBase
end
def test_preview_hidden
tmux.send_keys %(seq 1000 | #{FZF} --preview 'echo {{}-{}-\\$LINES-\\$COLUMNS}' --preview-window down:1:hidden --bind ?:toggle-preview), :Enter
tmux.send_keys %(seq 1000 | #{FZF} --preview 'echo {{}-{}-\\$FZF_PREVIEW_LINES-\\$FZF_PREVIEW_COLUMNS}' --preview-window down:1:hidden --bind ?:toggle-preview), :Enter
tmux.until { |lines| lines[-1] == '>' }
tmux.send_keys '?'
tmux.until { |lines| lines[-2] =~ / {1-1-1-[0-9]+}/ }