Skip to content

Commit

Permalink
patch 8.0.0714: when a timer causes a command line redraw " goes missing
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
brammool committed Jul 15, 2017
1 parent 0daf843 commit a92522f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/ex_getln.c
Expand Up @@ -52,6 +52,8 @@ static int cmd_showtail; /* Only show path tail in lists ? */
static int new_cmdpos; /* position set by set_cmdline_pos() */ static int new_cmdpos; /* position set by set_cmdline_pos() */
#endif #endif


static int extra_char = NUL; /* extra character to display when redrawing
* the command line */
#ifdef FEAT_CMDHIST #ifdef FEAT_CMDHIST
typedef struct hist_entry typedef struct hist_entry
{ {
Expand Down Expand Up @@ -1173,12 +1175,14 @@ getcmdline(
dont_scroll = TRUE; /* disallow scrolling here */ dont_scroll = TRUE; /* disallow scrolling here */
#endif #endif
putcmdline('"', TRUE); putcmdline('"', TRUE);
extra_char = '"';
++no_mapping; ++no_mapping;
i = c = plain_vgetc(); /* CTRL-R <char> */ i = c = plain_vgetc(); /* CTRL-R <char> */
if (i == Ctrl_O) if (i == Ctrl_O)
i = Ctrl_R; /* CTRL-R CTRL-O == CTRL-R CTRL-R */ i = Ctrl_R; /* CTRL-R CTRL-O == CTRL-R CTRL-R */
if (i == Ctrl_R) if (i == Ctrl_R)
c = plain_vgetc(); /* CTRL-R CTRL-R <char> */ c = plain_vgetc(); /* CTRL-R CTRL-R <char> */
extra_char = NUL;
--no_mapping; --no_mapping;
#ifdef FEAT_EVAL #ifdef FEAT_EVAL
/* /*
Expand Down Expand Up @@ -1755,8 +1759,10 @@ getcmdline(
ignore_drag_release = TRUE; ignore_drag_release = TRUE;
#endif #endif
putcmdline('^', TRUE); putcmdline('^', TRUE);
extra_char = '^';
c = get_literal(); /* get next (two) character(s) */ c = get_literal(); /* get next (two) character(s) */
do_abbr = FALSE; /* don't do abbreviation now */ do_abbr = FALSE; /* don't do abbreviation now */
extra_char = NUL;
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
/* may need to remove ^ when composing char was typed */ /* may need to remove ^ when composing char was typed */
if (enc_utf8 && utf_iscomposing(c) && !cmd_silent) if (enc_utf8 && utf_iscomposing(c) && !cmd_silent)
Expand All @@ -1774,10 +1780,12 @@ getcmdline(
ignore_drag_release = TRUE; ignore_drag_release = TRUE;
#endif #endif
putcmdline('?', TRUE); putcmdline('?', TRUE);
extra_char = '?';
#ifdef USE_ON_FLY_SCROLL #ifdef USE_ON_FLY_SCROLL
dont_scroll = TRUE; /* disallow scrolling here */ dont_scroll = TRUE; /* disallow scrolling here */
#endif #endif
c = get_digraph(TRUE); c = get_digraph(TRUE);
extra_char = NUL;
if (c != NUL) if (c != NUL)
break; break;


Expand Down Expand Up @@ -3409,6 +3417,8 @@ redrawcmd(void)
msg_no_more = FALSE; msg_no_more = FALSE;


set_cmdspos_cursor(); 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, * An emsg() before may have set msg_scroll. This is used in normal mode,
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -764,6 +764,8 @@ static char *(features[]) =


static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
714,
/**/ /**/
713, 713,
/**/ /**/
Expand Down

0 comments on commit a92522f

Please sign in to comment.