about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/computil.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index 4b81cbc82..3672de687 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -1485,8 +1485,11 @@ ca_parse_line(Cadef d, int multi, int first)
 		state.nargbeg = cur - 1;
 		state.argend = argend;
 	    }
-	    if (!d->args && !d->rest && *line && *line != '-' && *line != '+')
+	    if (!d->args && !d->rest && *line && *line != '-' && *line != '+') {
+		if (!multi && cur > compcurrent)
+		    break;
 		return 1;
+	    }
 	    if ((adef = state.def = ca_get_arg(d, state.nth)) &&
 		(state.def->type == CAA_RREST ||
 		 state.def->type == CAA_RARGS)) {