diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-02-10 06:53:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-10 06:53:26 +0800 |
commit | 3f419d84fbb918836fd90f2e09eace7ce3266f6b (patch) | |
tree | 04113cac4a14bd8a72c66346d2f8d1e094ee5b9d /test/functional | |
parent | 0d4d3e4325d475e62ff793391e4aba3c7c8561ee (diff) | |
download | rneovim-3f419d84fbb918836fd90f2e09eace7ce3266f6b.tar.gz rneovim-3f419d84fbb918836fd90f2e09eace7ce3266f6b.tar.bz2 rneovim-3f419d84fbb918836fd90f2e09eace7ce3266f6b.zip |
vim-patch:9.1.0088: TextChanged not triggered for :norm! commands (#27405)
Problem: TextChanged not triggered for :norm! commands
(machakann, after v9.0.2031)
Solution: Only reset curbuf->b_last_changedtick if TextChangedI
was triggered in insert mode (and not blocked)
Note: for unknown reasons, the test fails on Windows (but seems to work
fine when running interactively)
fixes: vim/vim#13967
closes: vim/vim#13984
https://github.com/vim/vim/commit/c9e79e52845d51f48f5ea3753a62ab3fe0e40184
Cherry-pick test_autocmd.vim change from patch 8.2.4149.
Co-authored-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/autocmd/textchanged_spec.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/functional/autocmd/textchanged_spec.lua b/test/functional/autocmd/textchanged_spec.lua index 850d67a18d..d501560dc1 100644 --- a/test/functional/autocmd/textchanged_spec.lua +++ b/test/functional/autocmd/textchanged_spec.lua @@ -180,3 +180,14 @@ it('TextChangedI and TextChanged', function() validate_mixed_textchangedi({ 's', '<esc>' }) validate_mixed_textchangedi({ 'S', '<esc>' }) end) + +-- oldtest: Test_TextChanged_with_norm() +it('TextChanged is triggered after :norm that enters Insert mode', function() + exec([[ + let g:a = 0 + au TextChanged * let g:a += 1 + ]]) + eq(0, eval('g:a')) + feed(':norm! ia<CR>') + eq(1, eval('g:a')) +end) |