Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
19712:714875349336 | 19713:8514e8b7e661 |
---|---|
4193 } | 4193 } |
4194 cmdwin_type = get_cmdline_type(); | 4194 cmdwin_type = get_cmdline_type(); |
4195 | 4195 |
4196 // Create the command-line buffer empty. | 4196 // Create the command-line buffer empty. |
4197 (void)do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, ECMD_HIDE, NULL); | 4197 (void)do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, ECMD_HIDE, NULL); |
4198 apply_autocmds(EVENT_BUFFILEPRE, NULL, NULL, FALSE, curbuf); | |
4198 (void)setfname(curbuf, (char_u *)"[Command Line]", NULL, TRUE); | 4199 (void)setfname(curbuf, (char_u *)"[Command Line]", NULL, TRUE); |
4200 apply_autocmds(EVENT_BUFFILEPOST, NULL, NULL, FALSE, curbuf); | |
4199 set_option_value((char_u *)"bt", 0L, (char_u *)"nofile", OPT_LOCAL); | 4201 set_option_value((char_u *)"bt", 0L, (char_u *)"nofile", OPT_LOCAL); |
4200 curbuf->b_p_ma = TRUE; | 4202 curbuf->b_p_ma = TRUE; |
4201 #ifdef FEAT_FOLDING | 4203 #ifdef FEAT_FOLDING |
4202 curwin->w_p_fen = FALSE; | 4204 curwin->w_p_fen = FALSE; |
4203 #endif | 4205 #endif |