mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-07 13:14:30 +08:00
[GFiles] Fix opening files from subdirectory
https://github.com/junegunn/fzf.vim/pull/1290#issuecomment-1208759166
This commit is contained in:
@@ -619,6 +619,7 @@ function! fzf#vim#gitfiles(args, ...)
|
|||||||
if a:args != '?'
|
if a:args != '?'
|
||||||
return s:fzf('gfiles', {
|
return s:fzf('gfiles', {
|
||||||
\ 'source': prefix . 'ls-files '.a:args.(s:is_win ? '' : ' | uniq'),
|
\ 'source': prefix . 'ls-files '.a:args.(s:is_win ? '' : ' | uniq'),
|
||||||
|
\ 'dir': root,
|
||||||
\ 'options': '-m --prompt "GitFiles> "'
|
\ 'options': '-m --prompt "GitFiles> "'
|
||||||
\}, a:000)
|
\}, a:000)
|
||||||
endif
|
endif
|
||||||
@@ -635,6 +636,7 @@ function! fzf#vim#gitfiles(args, ...)
|
|||||||
\ s:bin.preview)
|
\ s:bin.preview)
|
||||||
let wrapped = fzf#wrap({
|
let wrapped = fzf#wrap({
|
||||||
\ 'source': prefix . '-c color.status=always status --short --untracked-files=all',
|
\ 'source': prefix . '-c color.status=always status --short --untracked-files=all',
|
||||||
|
\ 'dir': root,
|
||||||
\ 'options': ['--ansi', '--multi', '--nth', '2..,..', '--tiebreak=index', '--prompt', 'GitFiles?> ', '--preview', preview]
|
\ 'options': ['--ansi', '--multi', '--nth', '2..,..', '--tiebreak=index', '--prompt', 'GitFiles?> ', '--preview', preview]
|
||||||
\})
|
\})
|
||||||
call s:remove_layout(wrapped)
|
call s:remove_layout(wrapped)
|
||||||
|
|||||||
Reference in New Issue
Block a user