Merge pull request #12971 from vigoux/decurbuf

Decrease reliance on curbuf in BUFEMPTY and `undo.c`
This commit is contained in:
Björn Linse
2021-07-09 10:15:18 +02:00
committed by GitHub
24 changed files with 258 additions and 225 deletions

View File

@@ -4180,7 +4180,7 @@ static void qf_fill_buffer(qf_list_T *qfl, buf_T *buf, qfline_T *old_last,
// Set the 'filetype' to "qf" each time after filling the buffer. This
// resembles reading a file into a buffer, it's more logical when using
// autocommands.
curbuf_lock++;
curbuf->b_ro_locked++;
set_option_value("ft", 0L, "qf", OPT_LOCAL);
curbuf->b_p_ma = false;
@@ -4190,7 +4190,7 @@ static void qf_fill_buffer(qf_list_T *qfl, buf_T *buf, qfline_T *old_last,
apply_autocmds(EVENT_BUFWINENTER, (char_u *)"quickfix", NULL,
false, curbuf);
keep_filetype = false;
curbuf_lock--;
curbuf->b_ro_locked--;
// make sure it will be redrawn
redraw_curbuf_later(NOT_VALID);