summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_autocmd.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-04-26 16:50:19 +0100
committerBram Moolenaar <Bram@vim.org>2023-04-26 16:50:19 +0100
commit73916bac5ac2a054a0c71adfe8d742691cdfd95c (patch)
treee06540d0d94aa32bffa1f2f56bbd71d67d314baa /src/testdir/test_autocmd.vim
parent2f14716c464bbbf1d6cabfb8e270eac0972e98d2 (diff)
patch 9.0.1490: the ModeChanged event may be triggered too oftenv9.0.1490
Problem: The ModeChanged event may be triggered too often. Solution: Only trigger ModeChanged when no operator is pending. (closes #12298)
Diffstat (limited to 'src/testdir/test_autocmd.vim')
-rw-r--r--src/testdir/test_autocmd.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim
index 176d2823d6..b74dda956d 100644
--- a/src/testdir/test_autocmd.vim
+++ b/src/testdir/test_autocmd.vim
@@ -3672,7 +3672,7 @@ endfunc
" Test for ModeChanged pattern
func Test_mode_changes()
let g:index = 0
- let g:mode_seq = ['n', 'i', 'n', 'v', 'V', 'i', 'ix', 'i', 'ic', 'i', 'n', 'no', 'n', 'V', 'v', 's', 'n']
+ let g:mode_seq = ['n', 'i', 'n', 'v', 'V', 'i', 'ix', 'i', 'ic', 'i', 'n', 'no', 'noV', 'n', 'V', 'v', 's', 'n']
func! TestMode()
call assert_equal(g:mode_seq[g:index], get(v:event, "old_mode"))
call assert_equal(g:mode_seq[g:index + 1], get(v:event, "new_mode"))
@@ -3683,7 +3683,7 @@ func Test_mode_changes()
au ModeChanged * :call TestMode()
let g:n_to_any = 0
au ModeChanged n:* let g:n_to_any += 1
- call feedkeys("i\<esc>vVca\<CR>\<C-X>\<C-L>\<esc>ggdG", 'tnix')
+ call feedkeys("i\<esc>vVca\<CR>\<C-X>\<C-L>\<esc>ggdV\<MouseMove>G", 'tnix')
let g:V_to_v = 0
au ModeChanged V:v let g:V_to_v += 1