mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 15:58:17 +00:00
vim-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.
5e94a29ebb
This commit is contained in:
@@ -5639,7 +5639,9 @@ void wipe_buffer(buf_T *buf, bool aucmd)
|
||||
void buf_open_scratch(handle_T bufnr, char *bufname)
|
||||
{
|
||||
(void)do_ecmd((int)bufnr, NULL, NULL, NULL, ECMD_ONE, ECMD_HIDE, NULL);
|
||||
apply_autocmds(EVENT_BUFFILEPRE, NULL, NULL, false, curbuf);
|
||||
(void)setfname(curbuf, bufname, NULL, true);
|
||||
apply_autocmds(EVENT_BUFFILEPOST, NULL, NULL, false, curbuf);
|
||||
set_option_value("bh", 0L, "hide", OPT_LOCAL);
|
||||
set_option_value("bt", 0L, "nofile", OPT_LOCAL);
|
||||
set_option_value("swf", 0L, NULL, OPT_LOCAL);
|
||||
|
Reference in New Issue
Block a user