diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2024-04-01 05:39:52 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-01 05:39:52 +0800 |
| commit | e005b8d2eb0d5967d46cae604e3fac0ccae37555 (patch) | |
| tree | 24e20506eb14131e6fad6a36b9b31469bb741813 /test/old/testdir | |
| parent | 9b9dab622a89a620419f4e0682d235bd30d705db (diff) | |
| download | rneovim-e005b8d2eb0d5967d46cae604e3fac0ccae37555.tar.gz rneovim-e005b8d2eb0d5967d46cae604e3fac0ccae37555.tar.bz2 rneovim-e005b8d2eb0d5967d46cae604e3fac0ccae37555.zip | |
vim-patch:9.1.0230: TextChanged autocommand not triggered under some circumstances (#28135)
Problem: TextChanged autocommand not triggered under some circumstances
(Sergey Vlasov)
Solution: Trigger TextChanged when TextChangedI has not been triggered
fixes: vim/vim#14332
closes: vim/vim#14339
https://github.com/vim/vim/commit/86032702932995db74fed265ba99ae0c823cb75d
Co-authored-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'test/old/testdir')
| -rw-r--r-- | test/old/testdir/test_autocmd.vim | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/old/testdir/test_autocmd.vim b/test/old/testdir/test_autocmd.vim index f1040b4b35..9dbd4ac521 100644 --- a/test/old/testdir/test_autocmd.vim +++ b/test/old/testdir/test_autocmd.vim @@ -3957,4 +3957,24 @@ func Test_implicit_session() call delete(expected) endfunc +" Test TextChangedI and TextChanged +func Test_Changed_ChangedI_2() + CheckRunVimInTerminal + call writefile(['one', 'two', 'three'], 'XTextChangedI2', 'D') + let before =<< trim END + autocmd TextChanged,TextChangedI * call writefile([b:changedtick], 'XTextChangedI3') + nnoremap <CR> o<Esc> + call writefile([], 'XTextChangedI3') + END + + call writefile(before, 'Xinit', 'D') + let buf = RunVimInTerminal('-S Xinit XtextChangedI2', {}) + call term_sendkeys(buf, "\<cr>") + call term_wait(buf) + call StopVimInTerminal(buf) + call assert_equal(['4'], readfile('XTextChangedI3')) + + call delete('XTextChangedI3') +endfunc + " vim: shiftwidth=2 sts=2 expandtab |