To: vim_dev@googlegroups.com Subject: Patch 8.2.3926 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3926 (after 8.2.3920) Problem: Build failure without the 'autochdir' option. (John Marriott) Solution: Add #ifdefs. Files: src/evalwindow.c *** ../vim-8.2.3925/src/evalwindow.c 2021-12-28 13:15:02.444896152 +0000 --- src/evalwindow.c 2021-12-28 20:00:48.357090501 +0000 *************** *** 709,719 **** --- 709,722 ---- 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,727 **** --- 725,731 ---- 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,737 **** execute_common(argvars, rettv, 1); } restore_win_noblock(save_curwin, save_curtab, TRUE); if (apply_acd) do_autochdir(); ! else if (cwd_status == OK) mch_chdir((char *)cwd); // Update the status line if the cursor moved. --- 733,744 ---- execute_common(argvars, rettv, 1); } restore_win_noblock(save_curwin, save_curtab, TRUE); + #ifdef FEAT_AUTOCHDIR if (apply_acd) do_autochdir(); ! else ! #endif ! if (cwd_status == OK) mch_chdir((char *)cwd); // Update the status line if the cursor moved. *** ../vim-8.2.3925/src/version.c 2021-12-28 18:29:28.637385570 +0000 --- src/version.c 2021-12-28 20:03:16.580836053 +0000 *************** *** 751,752 **** --- 751,754 ---- { /* Add new patch number below this line */ + /**/ + 3926, /**/ -- Why is it called "Windows"? "Gates" would be more appropriate... /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///