Problem: Typing CTRL-W in a prompt buffer shows mode "-- --".
Solution: Set restart_edit to 'A' and check for it.
// In a prompt window CTRL-W is used for window commands.
// Use Shift-CTRL-W to delete a word.
stuffcharReadbuff(Ctrl_W);
- restart_edit = 'i';
+ restart_edit = 'A';
nomove = TRUE;
count = 0;
goto doESCkey;
do_mode = ((p_smd && msg_silent == 0)
&& ((State & INSERT)
- || restart_edit
+ || restart_edit != NUL
|| VIsual_active));
if (do_mode || reg_recording != 0)
{
#endif
MSG_PUTS_ATTR(_(" INSERT"), attr);
}
- else if (restart_edit == 'I')
+ else if (restart_edit == 'I' || restart_edit == 'A')
MSG_PUTS_ATTR(_(" (insert)"), attr);
else if (restart_edit == 'R')
MSG_PUTS_ATTR(_(" (replace)"), attr);
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 64,
/**/
63,
/**/
// When leaving a prompt window stop Insert mode and perhaps restart
// it when entering that window again.
win->w_buffer->b_prompt_insert = restart_edit;
+ if (restart_edit != 0 && mode_displayed)
+ clear_cmdline = TRUE; /* unshow mode later */
restart_edit = NUL;
// When leaving the window (or closing the window) was done from a