Mercurial > vim
changeset 13172:7ab8c5983983 v8.0.1460
patch 8.0.1460: missing file in patch
commit https://github.com/vim/vim/commit/b5cb65ba2bcc6bbc6d2798a2dea18b95f0b38f5e
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 3 18:01:37 2018 +0100
patch 8.0.1460: missing file in patch
Problem: Missing file in patch.
Solution: Add changes to missing file.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 03 Feb 2018 18:15:05 +0100 |
parents | 4ed32d280b74 |
children | 7babbf8be763 |
files | src/misc2.c src/version.c |
diffstat | 2 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/misc2.c +++ b/src/misc2.c @@ -3389,13 +3389,20 @@ same_directory(char_u *f1, char_u *f2) * Return OK or FAIL. */ int -vim_chdirfile(char_u *fname) +vim_chdirfile(char_u *fname, char *trigger_autocmd UNUSED) { char_u dir[MAXPATHL]; + int res; vim_strncpy(dir, fname, MAXPATHL - 1); *gettail_sep(dir) = NUL; - return mch_chdir((char *)dir) == 0 ? OK : FAIL; + res = mch_chdir((char *)dir) == 0 ? OK : FAIL; +#ifdef FEAT_AUTOCMD + if (res == OK && trigger_autocmd != NULL) + apply_autocmds(EVENT_DIRCHANGED, (char_u *)trigger_autocmd, + dir, FALSE, curbuf); +#endif + return res; } #endif