Problem: CursorHoldI event interferes with "CTRL-G U". (Naohiro Ono)
Solution: Restore the flag for "CTRL-G U" after triggering CursorHoldI.
(closes #8937)
case K_CURSORHOLD: // Didn't type something for a while.
ins_apply_autocmds(EVENT_CURSORHOLDI);
did_cursorhold = TRUE;
+ // If CTRL-G U was used apply it to the next typed key.
+ if (dont_sync_undo == TRUE)
+ dont_sync_undo = MAYBE;
break;
#ifdef FEAT_GUI_MSWIN
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()
call test_override('starting', 1)
au! OptionSet
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 3467,
/**/
3466,
/**/