diff options
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r-- | src/nvim/ex_getln.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 9977be56ca..38385d19b2 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -775,9 +775,9 @@ static uint8_t *command_line_enter(int firstc, long count, int indent) redrawcmd(); } - // redraw the statusline for statuslines that display the current mode - // using the mode() function. - if (!cmd_silent && msg_scrolled == 0) { + // Redraw the statusline in case it uses the current mode using the mode() + // function. + if (!cmd_silent && msg_scrolled == 0 && *p_stl != NUL) { curwin->w_redr_status = true; redraw_statuslines(); } @@ -4093,9 +4093,10 @@ ExpandOne ( } if (mode == WILD_CANCEL) { - ss = vim_strsave(orig_save); + ss = vim_strsave(orig_save ? orig_save : (char_u *)""); } else if (mode == WILD_APPLY) { - ss = vim_strsave(findex == -1 ? orig_save : xp->xp_files[findex]); + ss = vim_strsave(findex == -1 ? (orig_save ? orig_save : (char_u *)"") : + xp->xp_files[findex]); } /* free old names */ |