Skip to content

Commit 8603356

Browse files
committed
patch 8.0.0710: a job that writes to a buffer clears completion
Problem: A job that writes to a buffer clears command line completion. (Ramel Eshed) Solution: Do not redraw while showing the completion menu.
1 parent 8327d1d commit 8603356

File tree

2 files changed

+15
-19
lines changed

2 files changed

+15
-19
lines changed

src/screen.c

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,10 @@ redraw_buf_and_status_later(buf_T *buf, int type)
275275
{
276276
win_T *wp;
277277

278+
if (wild_menu_showing != 0)
279+
/* Don't redraw while the command line completion is displayed, it
280+
* would disappear. */
281+
return;
278282
FOR_ALL_WINDOWS(wp)
279283
{
280284
if (wp->w_buffer == buf)
@@ -444,22 +448,12 @@ redraw_after_callback(void)
444448
; /* do nothing */
445449
else if (State & CMDLINE)
446450
{
447-
/* Redrawing only works when the screen didn't scroll. */
448-
if (msg_scrolled == 0)
449-
{
451+
/* Redrawing only works when the screen didn't scroll. Don't clear
452+
* wildmenu entries. */
453+
if (msg_scrolled == 0 && wild_menu_showing == 0)
450454
update_screen(0);
451-
compute_cmdrow();
452-
}
453-
else
454-
{
455-
/* Redraw in the same position, so that the user can continue
456-
* editing the command. */
457-
compute_cmdrow();
458-
if (cmdline_row > msg_scrolled)
459-
cmdline_row -= msg_scrolled;
460-
else
461-
cmdline_row = 0;
462-
}
455+
/* Redraw in the same position, so that the user can continue
456+
* editing the command. */
463457
redrawcmdline_ex(FALSE);
464458
}
465459
else if (State & (NORMAL | INSERT))
@@ -9417,9 +9411,9 @@ setcursor(void)
94179411

94189412

94199413
/*
9420-
* insert 'line_count' lines at 'row' in window 'wp'
9421-
* if 'invalid' is TRUE the wp->w_lines[].wl_lnum is invalidated.
9422-
* if 'mayclear' is TRUE the screen will be cleared if it is faster than
9414+
* Insert 'line_count' lines at 'row' in window 'wp'.
9415+
* If 'invalid' is TRUE the wp->w_lines[].wl_lnum is invalidated.
9416+
* If 'mayclear' is TRUE the screen will be cleared if it is faster than
94239417
* scrolling.
94249418
* Returns FAIL if the lines are not inserted, OK for success.
94259419
*/
@@ -9502,7 +9496,7 @@ win_ins_lines(
95029496
}
95039497

95049498
/*
9505-
* delete "line_count" window lines at "row" in window "wp"
9499+
* Delete "line_count" window lines at "row" in window "wp".
95069500
* If "invalid" is TRUE curwin->w_lines[] is invalidated.
95079501
* If "mayclear" is TRUE the screen will be cleared if it is faster than
95089502
* scrolling

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
710,
767769
/**/
768770
709,
769771
/**/

0 commit comments

Comments
 (0)