Problem: Hang with combination of feedkeys(), Ex mode and :global.
(Yegappan Lakshmanan)
Solution: Add the pending_exmode_active flag.
hold_gui_events = 0;
#endif
must_redraw = CLEAR;
+ pending_exmode_active = TRUE;
main_loop(FALSE, TRUE);
+ pending_exmode_active = FALSE;
RedrawingDisabled = rd;
no_wait_return = nwr;
msg_scroll = ms;
#ifdef FEAT_CMDWIN
tc = c;
#endif
+ // return from main_loop()
+ if (pending_exmode_active)
+ exmode_active = EXMODE_NORMAL;
+
break;
}
* Ex mode (Q) state
*/
EXTERN int exmode_active INIT(= 0); // zero, EXMODE_NORMAL or EXMODE_VIM
+
+// Flag set when main_loop() should exit when entering Ex mode.
+EXTERN int pending_exmode_active INIT(= FALSE);
+
EXTERN int ex_no_reprint INIT(= FALSE); // no need to print after z or p
EXTERN int reg_recording INIT(= 0); // register for recording or zero
close!
endfunc
+func Test_Ex_feedkeys()
+ " this doesn't do anything useful, just check it doesn't hang
+ new
+ call setline(1, ["foo"])
+ call feedkeys("Qg/foo/visual\<CR>", "xt")
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 274,
/**/
273,
/**/