aboutsummaryrefslogtreecommitdiff
path: root/test/old
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-09-27 18:58:43 +0800
committerGitHub <noreply@github.com>2023-09-27 18:58:43 +0800
commit10e57ad4cb99c43544f53f784f8eb368a2008353 (patch)
tree436eb2684f7d5897d6838b1bc232a0f5779c0516 /test/old
parentb65f4151d9e52a8521c0682a817c4dab9690e1e7 (diff)
downloadrneovim-10e57ad4cb99c43544f53f784f8eb368a2008353.tar.gz
rneovim-10e57ad4cb99c43544f53f784f8eb368a2008353.tar.bz2
rneovim-10e57ad4cb99c43544f53f784f8eb368a2008353.zip
vim-patch:8.2.3467: CursorHoldI event interferes with "CTRL-G U" (#25383)
Problem: CursorHoldI event interferes with "CTRL-G U". (Naohiro Ono) Solution: Restore the flag for "CTRL-G U" after triggering CursorHoldI. (closes vim/vim#8937) https://github.com/vim/vim/commit/5a9357d0bff9059f547906d8d03b31bca7215af1 Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test/old')
-rw-r--r--test/old/testdir/test_autocmd.vim16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/old/testdir/test_autocmd.vim b/test/old/testdir/test_autocmd.vim
index 406de695a3..d80c505d80 100644
--- a/test/old/testdir/test_autocmd.vim
+++ b/test/old/testdir/test_autocmd.vim
@@ -104,6 +104,22 @@ if has('timers')
set updatetime&
endfunc
+ func Test_cursorhold_insert_ctrl_g_U()
+ au CursorHoldI * :
+ set updatetime=20
+ new
+ call timer_start(100, { -> feedkeys("\<Left>foo\<Esc>", 't') })
+ call feedkeys("i()\<C-g>U", 'tx!')
+ sleep 200m
+ call assert_equal('(foo)', getline(1))
+ undo
+ call assert_equal('', getline(1))
+
+ bwipe!
+ au! CursorHoldI
+ set updatetime&
+ endfunc
+
func Test_OptionSet_modeline()
CheckFunction test_override
call test_override('starting', 1)