summaryrefslogtreecommitdiffstats
path: root/src/cmdexpand.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-06-18 21:14:30 +0200
committerBram Moolenaar <Bram@vim.org>2020-06-18 21:14:30 +0200
commitc8cb883015619cfe6db931ac2d6e15b0be5c56ed (patch)
treeb7c77228020edb2d8fb95fc9f14d6118e611e468 /src/cmdexpand.c
parentefd885559405e1561d577e1b0e6fa827705d285e (diff)
patch 8.2.1007: completion doesn't work after ":r ++arg !"v8.2.1007
Problem: Completion doesn't work after ":r ++arg !". Solution: Skip over "++arg". (Christian Brabandt, closes #6275, closes #6258)
Diffstat (limited to 'src/cmdexpand.c')
-rw-r--r--src/cmdexpand.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cmdexpand.c b/src/cmdexpand.c
index 9508d669dd..63f0cc7b15 100644
--- a/src/cmdexpand.c
+++ b/src/cmdexpand.c
@@ -1146,6 +1146,15 @@ set_one_cmd_context(
arg = skipwhite(arg);
}
+ // Skip over ++argopt argument
+ if ((ea.argt & EX_ARGOPT) && *arg != NUL && STRNCMP(arg, "++", 2) == 0)
+ {
+ p = arg;
+ while (*p && !vim_isspace(*p))
+ MB_PTR_ADV(p);
+ arg = skipwhite(p);
+ }
+
// Check for '|' to separate commands and '"' to start comments.
// Don't do this for ":read !cmd" and ":write !cmd".
if ((ea.argt & EX_TRLBAR) && !usefilter)