diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-03-19 18:46:57 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-03-19 18:46:57 +0100 |
commit | 5e94a29ebbde10dd973d58f1adba9a2fc83877d1 (patch) | |
tree | 66b87e6f87e558d31f2313791895a428fe9dead3 /src/terminal.c | |
parent | 37f471df6ee422beb4d08ee4ccda35f8279e3bb7 (diff) | |
download | vim-git-5e94a29ebbde10dd973d58f1adba9a2fc83877d1.tar.gz |
patch 8.2.0413: buffer menu does not handle special buffers properlyv8.2.0413
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.
Diffstat (limited to 'src/terminal.c')
-rw-r--r-- | src/terminal.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/terminal.c b/src/terminal.c index 30590b623..7f440a3bd 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -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); |