aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-08-06 04:25:55 +0200
committerGitHub <noreply@github.com>2017-08-06 04:25:55 +0200
commit5bec94652c9dd1d8cab260c4dd10e44d3f38f3cd (patch)
treefc61484a30532ef89f24c5b60534dccc56408d17 /src/nvim/ex_getln.c
parent55c0401dfd137a5e173d8551f763cb4c6fed56e1 (diff)
parent3827d5bc713d9ed149bc793f411debb5b89a4eba (diff)
downloadrneovim-5bec94652c9dd1d8cab260c4dd10e44d3f38f3cd.tar.gz
rneovim-5bec94652c9dd1d8cab260c4dd10e44d3f38f3cd.tar.bz2
rneovim-5bec94652c9dd1d8cab260c4dd10e44d3f38f3cd.zip
Merge #7110 from justinmk/preserve-wildmenu
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index 1d81a39dfe..ecd5c81822 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -12,6 +12,7 @@
#include <inttypes.h>
#include "nvim/assert.h"
+#include "nvim/log.h"
#include "nvim/vim.h"
#include "nvim/ascii.h"
#include "nvim/arabic.h"
@@ -472,11 +473,12 @@ static int command_line_execute(VimState *state, int key)
}
// free expanded names when finished walking through matches
- if (s->xpc.xp_numfiles != -1
- && !(s->c == p_wc && KeyTyped) && s->c != p_wcm
+ if (!(s->c == p_wc && KeyTyped) && s->c != p_wcm
&& s->c != Ctrl_N && s->c != Ctrl_P && s->c != Ctrl_A
&& s->c != Ctrl_L) {
- (void)ExpandOne(&s->xpc, NULL, NULL, 0, WILD_FREE);
+ if (s->xpc.xp_numfiles != -1) {
+ (void)ExpandOne(&s->xpc, NULL, NULL, 0, WILD_FREE);
+ }
s->did_wild_list = false;
if (!p_wmnu || (s->c != K_UP && s->c != K_DOWN)) {
s->xpc.xp_context = EXPAND_NOTHING;
@@ -1222,6 +1224,7 @@ static int command_line_handle_key(CommandLineState *s)
break; // Use ^D as normal char instead
}
+ wild_menu_showing = WM_LIST;
redrawcmd();
return 1; // don't do incremental search now
@@ -1452,7 +1455,7 @@ static int command_line_handle_key(CommandLineState *s)
if (s->hiscnt != s->i) {
// jumped to other entry
char_u *p;
- int len;
+ int len = 0;
int old_firstc;
xfree(ccline.cmdbuff);