Mercurial > vim
diff src/terminal.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 | dd3e5533a7d2 |
children | eb4887dd4b60 |
line wrap: on
line diff
--- 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);