diff --git a/autoload/sy.vim b/autoload/sy.vim index a254ea4..ef50dcb 100644 --- a/autoload/sy.vim +++ b/autoload/sy.vim @@ -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