mirror of
https://github.com/junegunn/fzf.vim.git
synced 2026-09-01 04:16:56 +08:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user