mirror of
https://github.com/neovim/neovim.git
synced 2025-09-19 01:38:16 +00:00
mksession: use exists(':tcd'), not has('nvim') #10770
Since recent vim versions also support :tcd, check for the actual availability of the command, rather than has('nvim').
This commit is contained in:
@@ -9181,7 +9181,7 @@ makeopens(
|
||||
|
||||
// Take care of tab-local working directories if applicable
|
||||
if (tp->tp_localdir) {
|
||||
if (fputs("if has('nvim') | tcd ", fd) < 0
|
||||
if (fputs("if exists(':tcd') == 2 | tcd ", fd) < 0
|
||||
|| ses_put_fname(fd, tp->tp_localdir, &ssop_flags) == FAIL
|
||||
|| fputs(" | endif", fd) < 0
|
||||
|| put_eol(fd) == FAIL) {
|
||||
|
Reference in New Issue
Block a user