mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 15:08:35 +00:00
vim-patch:8.0.0677: setting 'filetype' may switch buffers
Problem: Setting 'filetype' internally may cause the current buffer and
window to change unexpectedly.
Solution: Set curbuf_lock. (closes vim/vim#1734)
1814183b86
This commit is contained in:
@@ -4906,7 +4906,9 @@ void fix_help_buffer(void)
|
||||
|
||||
// Set filetype to "help".
|
||||
if (STRCMP(curbuf->b_p_ft, "help") != 0) {
|
||||
curbuf_lock++;
|
||||
set_option_value("ft", 0L, "help", OPT_LOCAL);
|
||||
curbuf_lock--;
|
||||
}
|
||||
|
||||
if (!syntax_present(curwin)) {
|
||||
|
Reference in New Issue
Block a user