From 4ae5a659f88ab38ce49ae6ab47a05142203ef530 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Wed, 26 Aug 2026 22:46:09 +0900 Subject: [PATCH] Fold g:fzf_action keys before the show key check fzf#wrap turns them into --expect, which fzf matches with the same case folding as a binding, so g:fzf_action = {'CTRL-O': 'split'} slipped past the check. The footer advertised Show while --expect closed fzf instead. --- autoload/fzf/vim.vim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/autoload/fzf/vim.vim b/autoload/fzf/vim.vim index e205959..a80e949 100755 --- a/autoload/fzf/vim.vim +++ b/autoload/fzf/vim.vim @@ -824,10 +824,13 @@ function! s:can_show(spec, bang, key, claimed) abort " key would win over ours, and a key the command binds itself would win by " coming later in the options. Any key of the list losing disables all of " them, so that the footer cannot advertise a key that does nothing - let actions = get(g:, 'fzf_action', s:default_action) + " g:fzf_action keys go through fzf as --expect, so they need the same + " folding as the show key before they can be compared + let actions = map(keys(get(g:, 'fzf_action', s:default_action)), + \ 'get(s:split_keys(v:val), 0, v:val)') let paste = s:split_keys(s:paste_key()) for key in s:split_keys(a:key) - if has_key(actions, key) || index(paste, key) >= 0 || index(a:claimed, key) >= 0 + if index(actions, key) >= 0 || index(paste, key) >= 0 || index(a:claimed, key) >= 0 return 0 endif endfor