mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-06 12:44:24 +08:00
Add undocumented fzf#vim#_recent_files function (#1024)
* Rename and make `s:all_files` public for user fzf extension
This commit is contained in:
@@ -469,7 +469,7 @@ endfunction
|
||||
" ------------------------------------------------------------------
|
||||
" History[:/]
|
||||
" ------------------------------------------------------------------
|
||||
function! s:all_files()
|
||||
function! fzf#vim#_recent_files()
|
||||
return fzf#vim#_uniq(map(
|
||||
\ filter([expand('%')], 'len(v:val)')
|
||||
\ + filter(map(s:buflisted_sorted(), 'bufname(v:val)'), 'len(v:val)')
|
||||
@@ -534,7 +534,7 @@ endfunction
|
||||
|
||||
function! fzf#vim#history(...)
|
||||
return s:fzf('history-files', {
|
||||
\ 'source': s:all_files(),
|
||||
\ 'source': fzf#vim#_recent_files(),
|
||||
\ 'options': ['-m', '--header-lines', !empty(expand('%')), '--prompt', 'Hist> ']
|
||||
\}, a:000)
|
||||
endfunction
|
||||
|
||||
Reference in New Issue
Block a user