summaryrefslogtreecommitdiffstats
path: root/src/cmdexpand.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-07-03 18:15:06 +0200
committerBram Moolenaar <Bram@vim.org>2020-07-03 18:15:06 +0200
commit743d0620203388bf87dc611cea544b485e4b9f85 (patch)
treef8e539f3b4292a86c5b33797438bc0db09f6eff7 /src/cmdexpand.c
parent92fdd1e75db3048516a93a18cc53ed984813c9e5 (diff)
patch 8.2.1121: command completion not working after ++argv8.2.1121
Problem: Command completion not working after ++arg. Solution: Move skipping up. (Christian Brabandt, closes #6382)
Diffstat (limited to 'src/cmdexpand.c')
-rw-r--r--src/cmdexpand.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/cmdexpand.c b/src/cmdexpand.c
index 63f0cc7b15..d92366c61e 100644
--- a/src/cmdexpand.c
+++ b/src/cmdexpand.c
@@ -1099,6 +1099,15 @@ set_one_cmd_context(
arg = skipwhite(p);
+ // 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);
+ }
+
if (ea.cmdidx == CMD_write || ea.cmdidx == CMD_update)
{
if (*arg == '>') // append
@@ -1146,14 +1155,6 @@ 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".