changeset 11664:e3bfe624ba0a v8.0.0714

patch 8.0.0714: when a timer causes a command line redraw " goes missing commit https://github.com/vim/vim/commit/a92522fbf3a49d06e08caf010f7d7b0f58d2e131 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 15 15:21:38 2017 +0200 patch 8.0.0714: when a timer causes a command line redraw " goes missing Problem: When a timer causes a command line redraw the " that is displayed for CTRL-R goes missing. Solution: Remember an extra character to display.
author Christian Brabandt <cb@256bit.org>
date Sat, 15 Jul 2017 15:30:04 +0200
parents 792badfededb
children d7fe6dc88ea4
files src/ex_getln.c src/version.c
diffstat 2 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -52,6 +52,8 @@ static int	cmd_showtail;		/* Only show p
 static int	new_cmdpos;	/* position set by set_cmdline_pos() */
 #endif
 
+static int	extra_char = NUL;  /* extra character to display when redrawing
+				    * the command line */
 #ifdef FEAT_CMDHIST
 typedef struct hist_entry
 {
@@ -1173,12 +1175,14 @@ getcmdline(
 		dont_scroll = TRUE;	/* disallow scrolling here */
 #endif
 		putcmdline('"', TRUE);
+		extra_char = '"';
 		++no_mapping;
 		i = c = plain_vgetc();	/* CTRL-R <char> */
 		if (i == Ctrl_O)
 		    i = Ctrl_R;		/* CTRL-R CTRL-O == CTRL-R CTRL-R */
 		if (i == Ctrl_R)
 		    c = plain_vgetc();	/* CTRL-R CTRL-R <char> */
+		extra_char = NUL;
 		--no_mapping;
 #ifdef FEAT_EVAL
 		/*
@@ -1755,8 +1759,10 @@ getcmdline(
 		ignore_drag_release = TRUE;
 #endif
 		putcmdline('^', TRUE);
+		extra_char = '^';
 		c = get_literal();	    /* get next (two) character(s) */
 		do_abbr = FALSE;	    /* don't do abbreviation now */
+		extra_char = NUL;
 #ifdef FEAT_MBYTE
 		/* may need to remove ^ when composing char was typed */
 		if (enc_utf8 && utf_iscomposing(c) && !cmd_silent)
@@ -1774,10 +1780,12 @@ getcmdline(
 		ignore_drag_release = TRUE;
 #endif
 		putcmdline('?', TRUE);
+		extra_char = '?';
 #ifdef USE_ON_FLY_SCROLL
 		dont_scroll = TRUE;	    /* disallow scrolling here */
 #endif
 		c = get_digraph(TRUE);
+		extra_char = NUL;
 		if (c != NUL)
 		    break;
 
@@ -3409,6 +3417,8 @@ redrawcmd(void)
     msg_no_more = FALSE;
 
     set_cmdspos_cursor();
+    if (extra_char != NUL)
+	putcmdline(extra_char, TRUE);
 
     /*
      * An emsg() before may have set msg_scroll. This is used in normal mode,
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    714,
+/**/
     713,
 /**/
     712,