vim-patch:9.1.0251: Filetype test fails (#28142)

Problem:  Filetype test fails.
Solution: Move detection by name before detection by extension.
          Improve TextChanged test and remove wrong test and fix
          a typo in a comment (zeertzjq).

closes: vim/vim#14373

8eb7523802

The changes to filetype.vim are N/A since Nvim always prefers filename
matches to extension matches.
This commit is contained in:
zeertzjq
2024-04-01 21:49:44 +08:00
committed by GitHub
parent 381806729d
commit 4a6b4b00cb
3 changed files with 18 additions and 16 deletions

View File

@@ -367,7 +367,7 @@ static void insert_enter(InsertState *s)
// ins_redraw() triggers TextChangedI only when no characters
// are in the typeahead buffer, so reset curbuf->b_last_changedtick
// if the TextChangedI was not blocked by char_avail() (e.g. using :norm!)
// and the TextChangedI autocommand has been triggered
// and the TextChangedI autocommand has been triggered.
if (!char_avail() && curbuf->b_last_changedtick_i == buf_get_changedtick(curbuf)) {
curbuf->b_last_changedtick = buf_get_changedtick(curbuf);
}