Fix tcd breakage
This fix is backwards compatible with vim.
This commit is contained in:
parent
3f9f292d0f
commit
a7e3219de8
@ -24,9 +24,18 @@ function! sy#start() abort
|
|||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
function! s:chdir()
|
||||||
|
if has('nvim')
|
||||||
|
return haslocaldir() ? 'lcd' : haslocaldir(-1, 0) ? 'tcd' : 'cd'
|
||||||
|
else
|
||||||
|
return haslocaldir() ? 'lcd' : 'cd'
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
" sy_info is used in autoload/sy/repo
|
" sy_info is used in autoload/sy/repo
|
||||||
let b:sy_info = {
|
let b:sy_info = {
|
||||||
\ 'chdir': haslocaldir() ? 'lcd' : 'cd',
|
\ 'chdir': s:chdir(),
|
||||||
\ 'cwd': fnameescape(getcwd()),
|
\ 'cwd': fnameescape(getcwd()),
|
||||||
\ 'dir': fnamemodify(sy_path, ':p:h'),
|
\ 'dir': fnamemodify(sy_path, ':p:h'),
|
||||||
\ 'path': sy#util#escape(sy_path),
|
\ 'path': sy#util#escape(sy_path),
|
||||||
|
Loading…
Reference in New Issue
Block a user