mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-06 20:54:28 +08:00
@@ -611,8 +611,11 @@ function! fzf#vim#_recent_files()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:history_source(type)
|
function! s:history_source(type)
|
||||||
let max = histnr(a:type)
|
let max = histnr(a:type)
|
||||||
let fmt = s:yellow(' %'.len(string(max)).'d ', 'Number')
|
if max <= 0
|
||||||
|
return ['No entries']
|
||||||
|
endif
|
||||||
|
let fmt = s:yellow(' %'.len(string(max)).'d ', 'Number')
|
||||||
let list = filter(map(range(1, max), 'histget(a:type, - v:val)'), '!empty(v:val)')
|
let list = filter(map(range(1, max), 'histget(a:type, - v:val)'), '!empty(v:val)')
|
||||||
return extend([' :: Press '.s:magenta('CTRL-E', 'Special').' to edit'],
|
return extend([' :: Press '.s:magenta('CTRL-E', 'Special').' to edit'],
|
||||||
\ map(list, 'printf(fmt, len(list) - v:key)." ".v:val'))
|
\ map(list, 'printf(fmt, len(list) - v:key)." ".v:val'))
|
||||||
|
|||||||
Reference in New Issue
Block a user