mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 9.1.0231: Filetype may be undetected when SwapExists sets ft in other buf
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: #14344 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
8603270293
commit
5bf6c2117f
@@ -3133,6 +3133,19 @@ struct file_buffer
|
||||
int b_marks_read; // Have we read viminfo marks yet?
|
||||
#endif
|
||||
|
||||
int b_modified_was_set; // did ":set modified"
|
||||
int b_did_filetype; // FileType event found
|
||||
int b_keep_filetype; // value for did_filetype when starting
|
||||
// to execute autocommands
|
||||
|
||||
// Set by the apply_autocmds_group function if the given event is equal to
|
||||
// EVENT_FILETYPE. Used by the readfile function in order to determine if
|
||||
// EVENT_BUFREADPOST triggered the EVENT_FILETYPE.
|
||||
//
|
||||
// Relying on this value requires one to reset it prior calling
|
||||
// apply_autocmds_group().
|
||||
int b_au_did_filetype;
|
||||
|
||||
/*
|
||||
* The following only used in undo.c.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user