summaryrefslogtreecommitdiff
path: root/src/ex_getln.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-09-05 21:51:14 +0200
committerBram Moolenaar <Bram@vim.org>2016-09-05 21:51:14 +0200
commit33a80eeb859a78ba93432da6fa585786cfd77249 (patch)
tree9b6f87d27beae24a9d3d15d20b310fd13a81f989 /src/ex_getln.c
parent030cddc7ec0c3d2fe3969140cd1b92b2f18633c0 (diff)
downloadvim-git-33a80eeb859a78ba93432da6fa585786cfd77249.tar.gz
patch 7.4.2331v7.4.2331
Problem: Using CTRL-X CTRL-V to complete a command line from Insert mode does not work after entering an expression on the command line. Solution: Don't use "ccline" when not actually using a command line. (test by Hirohito Higashi)
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r--src/ex_getln.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c
index ed82f0fd3..4ff9ae17a 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -4509,7 +4509,7 @@ set_expand_context(expand_T *xp)
xp->xp_context = EXPAND_NOTHING;
return;
}
- set_cmd_context(xp, ccline.cmdbuff, ccline.cmdlen, ccline.cmdpos);
+ set_cmd_context(xp, ccline.cmdbuff, ccline.cmdlen, ccline.cmdpos, TRUE);
}
void
@@ -4517,7 +4517,8 @@ set_cmd_context(
expand_T *xp,
char_u *str, /* start of command line */
int len, /* length of command line (excl. NUL) */
- int col) /* position of cursor */
+ int col, /* position of cursor */
+ int use_ccline UNUSED) /* use ccline for info */
{
int old_char = NUL;
char_u *nextcomm;
@@ -4532,14 +4533,14 @@ set_cmd_context(
nextcomm = str;
#ifdef FEAT_EVAL
- if (ccline.cmdfirstc == '=')
+ if (use_ccline && ccline.cmdfirstc == '=')
{
# ifdef FEAT_CMDL_COMPL
/* pass CMD_SIZE because there is no real command */
set_context_for_expression(xp, str, CMD_SIZE);
# endif
}
- else if (ccline.input_fn)
+ else if (use_ccline && ccline.input_fn)
{
xp->xp_context = ccline.xp_context;
xp->xp_pattern = ccline.cmdbuff;