about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Src/Zle/computil.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index 64ce394c6..9d289f16b 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -1235,12 +1235,12 @@ ca_parse_line(Cadef d)
 	    else {
 		LinkList l = state.oargs[state.curopt->num];
 
+		if (cur < compcurrent)
+		    memcpy(&ca_laststate, &state, sizeof(state));
 		PERMALLOC {
 		    for (; line; line = compwords[cur++])
 			addlinknode(l, ztrdup(line));
 		} LASTALLOC;
-		if (cur < compcurrent)
-		    memcpy(&ca_laststate, &state, sizeof(state));
 		ca_laststate.ddef = NULL;
 		ca_laststate.doff = 0;
 		break;