aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/quickfix.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-04-01 06:12:11 +0800
committerGitHub <noreply@github.com>2024-04-01 06:12:11 +0800
commitb08667d4f00e434eac9874e4005ab8e1fd9d3e95 (patch)
treebf4b40e983294fbf96bdd6b9699cdb6526dd0fe6 /src/nvim/quickfix.c
parente005b8d2eb0d5967d46cae604e3fac0ccae37555 (diff)
downloadrneovim-b08667d4f00e434eac9874e4005ab8e1fd9d3e95.tar.gz
rneovim-b08667d4f00e434eac9874e4005ab8e1fd9d3e95.tar.bz2
rneovim-b08667d4f00e434eac9874e4005ab8e1fd9d3e95.zip
vim-patch:9.1.0231: Filetype may be undetected when SwapExists sets ft in other buf (#28136)
Problem: Filetype may be undetected when a SwapExists autocommand sets filetype in another buffer. Solution: Make filetype detection state buffer-specific. Also fix a similar problem for 'modified' (zeertzjq). closes: vim/vim#14344 https://github.com/vim/vim/commit/5bf6c2117fcef85fcf046c098dd3eb72a0147859
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r--src/nvim/quickfix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c
index 9f431556e8..94e176bd94 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -4274,10 +4274,10 @@ static void qf_fill_buffer(qf_list_T *qfl, buf_T *buf, qfline_T *old_last, int q
set_option_value_give_err(kOptFiletype, STATIC_CSTR_AS_OPTVAL("qf"), OPT_LOCAL);
curbuf->b_p_ma = false;
- keep_filetype = true; // don't detect 'filetype'
+ curbuf->b_keep_filetype = true; // don't detect 'filetype'
apply_autocmds(EVENT_BUFREADPOST, "quickfix", NULL, false, curbuf);
apply_autocmds(EVENT_BUFWINENTER, "quickfix", NULL, false, curbuf);
- keep_filetype = false;
+ curbuf->b_keep_filetype = false;
curbuf->b_ro_locked--;
// make sure it will be redrawn