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[:/]
|
" History[:/]
|
||||||
" ------------------------------------------------------------------
|
" ------------------------------------------------------------------
|
||||||
function! s:all_files()
|
function! fzf#vim#_recent_files()
|
||||||
return fzf#vim#_uniq(map(
|
return fzf#vim#_uniq(map(
|
||||||
\ filter([expand('%')], 'len(v:val)')
|
\ filter([expand('%')], 'len(v:val)')
|
||||||
\ + filter(map(s:buflisted_sorted(), 'bufname(v:val)'), 'len(v:val)')
|
\ + filter(map(s:buflisted_sorted(), 'bufname(v:val)'), 'len(v:val)')
|
||||||
@@ -534,7 +534,7 @@ endfunction
|
|||||||
|
|
||||||
function! fzf#vim#history(...)
|
function! fzf#vim#history(...)
|
||||||
return s:fzf('history-files', {
|
return s:fzf('history-files', {
|
||||||
\ 'source': s:all_files(),
|
\ 'source': fzf#vim#_recent_files(),
|
||||||
\ 'options': ['-m', '--header-lines', !empty(expand('%')), '--prompt', 'Hist> ']
|
\ 'options': ['-m', '--header-lines', !empty(expand('%')), '--prompt', 'Hist> ']
|
||||||
\}, a:000)
|
\}, a:000)
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
Reference in New Issue
Block a user