fix(qf): use correct buffer field

This commit is contained in:
Thomas Vigouroux 2021-07-06 19:51:59 +02:00
parent 7970631fa0
commit e5804d46fd
No known key found for this signature in database
GPG Key ID: 16A6001CD57B9100

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 // 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 // resembles reading a file into a buffer, it's more logical when using
// autocommands. // autocommands.
curbuf->b_locked++; curbuf->b_ro_locked++;
set_option_value("ft", 0L, "qf", OPT_LOCAL); set_option_value("ft", 0L, "qf", OPT_LOCAL);
curbuf->b_p_ma = false; 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, apply_autocmds(EVENT_BUFWINENTER, (char_u *)"quickfix", NULL,
false, curbuf); false, curbuf);
keep_filetype = false; keep_filetype = false;
curbuf->b_locked--; curbuf->b_ro_locked--;
// make sure it will be redrawn // make sure it will be redrawn
redraw_curbuf_later(NOT_VALID); redraw_curbuf_later(NOT_VALID);