Mercurial > vim
comparison src/misc2.c @ 27617:269f89efb06a v8.2.4335
patch 8.2.4335: no autocommand event triggered before changing directory
Commit: https://github.com/vim/vim/commit/28e8f73ae2d90009fd62cd60f97c2643ba44de68
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Feb 9 12:58:20 2022 +0000
patch 8.2.4335: no autocommand event triggered before changing directory
Problem: No autocommand event triggered before changing directory. (Ronnie
Magatti)
Solution: Add DirChangedPre. (closes #9721)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 09 Feb 2022 14:00:05 +0100 |
parents | 9986f96fb1bd |
children | bef82285dda0 |
comparison
equal
deleted
inserted
replaced
27616:431c6a7a1f8b | 27617:269f89efb06a |
---|---|
1911 *gettail_sep(new_dir) = NUL; | 1911 *gettail_sep(new_dir) = NUL; |
1912 | 1912 |
1913 if (pathcmp((char *)old_dir, (char *)new_dir, -1) == 0) | 1913 if (pathcmp((char *)old_dir, (char *)new_dir, -1) == 0) |
1914 // nothing to do | 1914 // nothing to do |
1915 return OK; | 1915 return OK; |
1916 | |
1917 if (trigger_autocmd != NULL) | |
1918 trigger_DirChangedPre((char_u *)trigger_autocmd, new_dir); | |
1916 | 1919 |
1917 if (mch_chdir((char *)new_dir) != 0) | 1920 if (mch_chdir((char *)new_dir) != 0) |
1918 return FAIL; | 1921 return FAIL; |
1919 | 1922 |
1920 if (trigger_autocmd != NULL) | 1923 if (trigger_autocmd != NULL) |