Export FZF_CURRENT_ITEM to child processes (#4803)

Close #4802
This commit is contained in:
Junegunn Choi
2026-05-23 22:28:03 +09:00
committed by GitHub
parent 677e854850
commit de1fca99d5
4 changed files with 9 additions and 2 deletions
+3 -2
View File
@@ -2286,6 +2286,7 @@ class TestCore < TestInteractive
FZF_ACTION: 'start',
FZF_KEY: '',
FZF_POS: '1',
FZF_CURRENT_ITEM: '1',
FZF_QUERY: '',
FZF_POINTER: '>',
FZF_PROMPT: '> ',
@@ -2301,12 +2302,12 @@ class TestCore < TestInteractive
end
tmux.send_keys :Tab, :Tab
tmux.until do
expected.merge!(FZF_ACTION: 'toggle-down', FZF_KEY: 'tab', FZF_POS: '3', FZF_SELECT_COUNT: '2')
expected.merge!(FZF_ACTION: 'toggle-down', FZF_KEY: 'tab', FZF_POS: '3', FZF_CURRENT_ITEM: '3', FZF_SELECT_COUNT: '2')
assert_equal expected, env_vars.slice(*expected.keys)
end
tmux.send_keys '99'
tmux.until do
expected.merge!(FZF_ACTION: 'char', FZF_KEY: '9', FZF_QUERY: '99', FZF_MATCH_COUNT: '1', FZF_POS: '1')
expected.merge!(FZF_ACTION: 'char', FZF_KEY: '9', FZF_QUERY: '99', FZF_MATCH_COUNT: '1', FZF_POS: '1', FZF_CURRENT_ITEM: '99')
assert_equal expected, env_vars.slice(*expected.keys)
end
tmux.send_keys :Space