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:
mg979 2019-08-14 08:45:54 +02:00 committed by Justin M. Keyes
parent c285ebfa73
commit a690bf8116
1 changed files with 1 additions and 1 deletions

View File

@ -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) {