summaryrefslogtreecommitdiff
path: root/src/screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c32
1 files changed, 13 insertions, 19 deletions
diff --git a/src/screen.c b/src/screen.c
index f047534e8..5a360b5ff 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -275,6 +275,10 @@ redraw_buf_and_status_later(buf_T *buf, int type)
{
win_T *wp;
+ if (wild_menu_showing != 0)
+ /* Don't redraw while the command line completion is displayed, it
+ * would disappear. */
+ return;
FOR_ALL_WINDOWS(wp)
{
if (wp->w_buffer == buf)
@@ -444,22 +448,12 @@ redraw_after_callback(void)
; /* do nothing */
else if (State & CMDLINE)
{
- /* Redrawing only works when the screen didn't scroll. */
- if (msg_scrolled == 0)
- {
+ /* Redrawing only works when the screen didn't scroll. Don't clear
+ * wildmenu entries. */
+ if (msg_scrolled == 0 && wild_menu_showing == 0)
update_screen(0);
- compute_cmdrow();
- }
- else
- {
- /* Redraw in the same position, so that the user can continue
- * editing the command. */
- compute_cmdrow();
- if (cmdline_row > msg_scrolled)
- cmdline_row -= msg_scrolled;
- else
- cmdline_row = 0;
- }
+ /* Redraw in the same position, so that the user can continue
+ * editing the command. */
redrawcmdline_ex(FALSE);
}
else if (State & (NORMAL | INSERT))
@@ -9417,9 +9411,9 @@ setcursor(void)
/*
- * insert 'line_count' lines at 'row' in window 'wp'
- * if 'invalid' is TRUE the wp->w_lines[].wl_lnum is invalidated.
- * if 'mayclear' is TRUE the screen will be cleared if it is faster than
+ * Insert 'line_count' lines at 'row' in window 'wp'.
+ * If 'invalid' is TRUE the wp->w_lines[].wl_lnum is invalidated.
+ * If 'mayclear' is TRUE the screen will be cleared if it is faster than
* scrolling.
* Returns FAIL if the lines are not inserted, OK for success.
*/
@@ -9502,7 +9496,7 @@ win_ins_lines(
}
/*
- * delete "line_count" window lines at "row" in window "wp"
+ * Delete "line_count" window lines at "row" in window "wp".
* If "invalid" is TRUE curwin->w_lines[] is invalidated.
* If "mayclear" is TRUE the screen will be cleared if it is faster than
* scrolling