mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-06 12:44:24 +08:00
Use different prompt color for each mapmode
This commit is contained in:
@@ -770,10 +770,11 @@ function! fzf#vim#maps(mode, ...)
|
|||||||
let aligned = s:align_pairs(list)
|
let aligned = s:align_pairs(list)
|
||||||
let sorted = sort(aligned)
|
let sorted = sort(aligned)
|
||||||
let colored = map(sorted, 's:highlight_keys(v:val)')
|
let colored = map(sorted, 's:highlight_keys(v:val)')
|
||||||
|
let pcolor = a:mode == 'x' ? 9 : a:mode == 'o' ? 10 : 12
|
||||||
call s:fzf({
|
call s:fzf({
|
||||||
\ 'source': colored,
|
\ 'source': colored,
|
||||||
\ 'sink': function('s:key_sink'),
|
\ 'sink': function('s:key_sink'),
|
||||||
\ 'options': '--prompt "Maps ('.a:mode.')> " --ansi --no-hscroll --nth 1,..'}, a:000)
|
\ 'options': '--prompt "Maps ('.a:mode.')> " --ansi --no-hscroll --nth 1,.. --color prompt:'.pcolor}, a:000)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" ----------------------------------------------------------------------------
|
" ----------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user