summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-12-28 20:03:43 +0000
committerBram Moolenaar <Bram@vim.org>2021-12-28 20:03:43 +0000
commit92f246e4f9936f15471d5ee71b9afd5f3e6e0653 (patch)
treeafb042f7411bf3b503df3fe61a55f31e0408eed8
parent06f6095623cfcc72da08748c058d13b465652fd4 (diff)
downloadvim-git-8.2.3926.tar.gz
patch 8.2.3926: build failure without the 'autochdir' optionv8.2.3926
Problem: Build failure without the 'autochdir' option. (John Marriott) Solution: Add #ifdefs.
-rw-r--r--src/evalwindow.c9
-rw-r--r--src/version.c2
2 files changed, 10 insertions, 1 deletions
diff --git a/src/evalwindow.c b/src/evalwindow.c
index ebab85614..4ac60265c 100644
--- a/src/evalwindow.c
+++ b/src/evalwindow.c
@@ -709,11 +709,14 @@ f_win_execute(typval_T *argvars, typval_T *rettv)
pos_T curpos = wp->w_cursor;
char_u cwd[MAXPATHL];
int cwd_status;
+#ifdef FEAT_AUTOCHDIR
char_u autocwd[MAXPATHL];
int apply_acd = FALSE;
+#endif
cwd_status = mch_dirname(cwd, MAXPATHL);
+#ifdef FEAT_AUTOCHDIR
// If 'acd' is set, check we are using that directory. If yes, then
// apply 'acd' afterwards, otherwise restore the current directory.
if (cwd_status == OK && p_acd)
@@ -722,6 +725,7 @@ f_win_execute(typval_T *argvars, typval_T *rettv)
apply_acd = mch_dirname(autocwd, MAXPATHL) == OK
&& STRCMP(cwd, autocwd) == 0;
}
+#endif
if (switch_win_noblock(&save_curwin, &save_curtab, wp, tp, TRUE) == OK)
{
@@ -729,9 +733,12 @@ f_win_execute(typval_T *argvars, typval_T *rettv)
execute_common(argvars, rettv, 1);
}
restore_win_noblock(save_curwin, save_curtab, TRUE);
+#ifdef FEAT_AUTOCHDIR
if (apply_acd)
do_autochdir();
- else if (cwd_status == OK)
+ else
+#endif
+ if (cwd_status == OK)
mch_chdir((char *)cwd);
// Update the status line if the cursor moved.
diff --git a/src/version.c b/src/version.c
index 60b1e5c92..e09197183 100644
--- a/src/version.c
+++ b/src/version.c
@@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 3926,
+/**/
3925,
/**/
3924,