forked from aniani/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.
This commit is contained in:
@@ -523,6 +523,8 @@ term_start(
|
||||
term->tl_next = first_term;
|
||||
first_term = term;
|
||||
|
||||
apply_autocmds(EVENT_BUFFILEPRE, NULL, NULL, FALSE, curbuf);
|
||||
|
||||
if (opt->jo_term_name != NULL)
|
||||
curbuf->b_ffname = vim_strsave(opt->jo_term_name);
|
||||
else if (argv != NULL)
|
||||
@@ -571,6 +573,8 @@ term_start(
|
||||
curbuf->b_sfname = vim_strsave(curbuf->b_ffname);
|
||||
curbuf->b_fname = curbuf->b_ffname;
|
||||
|
||||
apply_autocmds(EVENT_BUFFILEPOST, NULL, NULL, FALSE, curbuf);
|
||||
|
||||
if (opt->jo_term_opencmd != NULL)
|
||||
term->tl_opencmd = vim_strsave(opt->jo_term_opencmd);
|
||||
|
||||
|
Reference in New Issue
Block a user