aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormg979 <mg1979.git@gmail.com>2019-08-14 08:45:54 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-08-14 08:45:54 +0200
commita690bf811646c1ef70f6cf767c7f562fd00e3a85 (patch)
tree87bcf0d9c81dd35a64e457da5d2655d6f38da21d
parentc285ebfa73d9347a64022ac277cc68fb0683a794 (diff)
downloadrneovim-a690bf811646c1ef70f6cf767c7f562fd00e3a85.tar.gz
rneovim-a690bf811646c1ef70f6cf767c7f562fd00e3a85.tar.bz2
rneovim-a690bf811646c1ef70f6cf767c7f562fd00e3a85.zip
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').
-rw-r--r--src/nvim/ex_docmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 0f345df22b..18043bf710 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -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) {