aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-04-01 21:49:44 +0800
committerGitHub <noreply@github.com>2024-04-01 21:49:44 +0800
commit4a6b4b00cb6d619145cc420a52d80b1f62b19245 (patch)
treed45e9638d97b90bcb9f63b603c0452332e81bdb2 /test/functional
parent381806729db1016106b02d866c4f4f64f76a351f (diff)
downloadrneovim-4a6b4b00cb6d619145cc420a52d80b1f62b19245.tar.gz
rneovim-4a6b4b00cb6d619145cc420a52d80b1f62b19245.tar.bz2
rneovim-4a6b4b00cb6d619145cc420a52d80b1f62b19245.zip
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 https://github.com/vim/vim/commit/8eb7523802cb51984e2202d08a4fbc1a2cd803c7 The changes to filetype.vim are N/A since Nvim always prefers filename matches to extension matches.
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/autocmd/textchanged_spec.lua11
1 files changed, 4 insertions, 7 deletions
diff --git a/test/functional/autocmd/textchanged_spec.lua b/test/functional/autocmd/textchanged_spec.lua
index 8d8058da70..4abf52fa7a 100644
--- a/test/functional/autocmd/textchanged_spec.lua
+++ b/test/functional/autocmd/textchanged_spec.lua
@@ -194,17 +194,14 @@ end)
-- oldtest: Test_Changed_ChangedI_2()
it('TextChanged is triggered after mapping that enters & exits Insert mode', function()
exec([[
- let [g:autocmd_i, g:autocmd_n] = ['','']
+ let [g:autocmd_n, g:autocmd_i] = ['','']
- func! TextChangedAutocmdI(char)
+ func TextChangedAutocmd(char)
let g:autocmd_{tolower(a:char)} = a:char .. b:changedtick
endfunc
- augroup Test_TextChanged
- au!
- au TextChanged <buffer> :call TextChangedAutocmdI('N')
- au TextChangedI <buffer> :call TextChangedAutocmdI('I')
- augroup END
+ au TextChanged <buffer> :call TextChangedAutocmd('N')
+ au TextChangedI <buffer> :call TextChangedAutocmd('I')
nnoremap <CR> o<Esc>
]])