mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-12 20:35:54 +01:00
Avoid cooked terminal mode (#1604)
as `:help system()` states
When prepended by |:silent| the terminal will not be set to
cooked mode. This is meant to be used for commands that do
not need the user to type. It avoids stray characters showing
up on the screen which require |CTRL-L| to remove. >
:silent let f = system('ls *.vim')
This commit is contained in:
@@ -718,7 +718,7 @@ function! s:get_git_root(dir)
|
||||
return FugitiveWorkTree()
|
||||
endif
|
||||
let dir = len(a:dir) ? a:dir : substitute(split(expand('%:p:h'), '[/\\]\.git\([/\\]\|$\)')[0], '^fugitive://', '', '')
|
||||
let root = systemlist('git -C ' . shellescape(dir) . ' rev-parse --show-toplevel')[0]
|
||||
silent let root = systemlist('git -C ' . shellescape(dir) . ' rev-parse --show-toplevel')[0]
|
||||
return v:shell_error ? '' : (len(a:dir) ? fnamemodify(a:dir, ':p') : root)
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user