diff src/ex_getln.c @ 19713:8514e8b7e661 v8.2.0413

patch 8.2.0413: buffer menu does not handle special buffers properly Commit: https://github.com/vim/vim/commit/5e94a29ebbde10dd973d58f1adba9a2fc83877d1 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Mar 19 18:46:57 2020 +0100 patch 8.2.0413: buffer menu does not handle special buffers properly Problem: Buffer menu does not handle special buffers properly. Solution: Keep a dictionary with buffer names to reliably keep track of entries. Also trigger BufFilePre and BufFilePost for command-line and terminal buffers when the name changes.
author Bram Moolenaar <Bram@vim.org>
date Thu, 19 Mar 2020 19:00:04 +0100
parents d64f403289db
children 5feb426d2ea1
line wrap: on
line diff
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -4195,7 +4195,9 @@ open_cmdwin(void)
 
     // Create the command-line buffer empty.
     (void)do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, ECMD_HIDE, NULL);
+    apply_autocmds(EVENT_BUFFILEPRE, NULL, NULL, FALSE, curbuf);
     (void)setfname(curbuf, (char_u *)"[Command Line]", NULL, TRUE);
+    apply_autocmds(EVENT_BUFFILEPOST, NULL, NULL, FALSE, curbuf);
     set_option_value((char_u *)"bt", 0L, (char_u *)"nofile", OPT_LOCAL);
     curbuf->b_p_ma = TRUE;
 #ifdef FEAT_FOLDING