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
@ -2961,7 +2961,7 @@ do_ecmd(
|
||||
// Since we are starting to edit a file, consider the filetype to be
|
||||
// unset. Helps for when an autocommand changes files and expects syntax
|
||||
// highlighting to work in the other file.
|
||||
did_filetype = FALSE;
|
||||
curbuf->b_did_filetype = FALSE;
|
||||
|
||||
/*
|
||||
* other_file oldbuf
|
||||
|
||||
Reference in New Issue
Block a user