Check whether :tcd exists before using tab-specific haslocaldir()
Closes #197
This commit is contained in:
parent
79d867a7a6
commit
32d8797d88
@ -26,11 +26,7 @@ function! sy#start() abort
|
||||
|
||||
|
||||
function! s:chdir()
|
||||
if has('nvim')
|
||||
return haslocaldir() ? 'lcd' : haslocaldir(-1, 0) ? 'tcd' : 'cd'
|
||||
else
|
||||
return haslocaldir() ? 'lcd' : 'cd'
|
||||
endif
|
||||
return haslocaldir() ? 'lcd' : (exists(':tcd') && haslocaldir(-1, 0)) ? 'tcd' : 'cd'
|
||||
endfunction
|
||||
|
||||
" sy_info is used in autoload/sy/repo
|
||||
|
Loading…
Reference in New Issue
Block a user