From 977f9ff5c8137b76fea8e93498086525af460cc5 Mon Sep 17 00:00:00 2001 From: Patrick Oscity Date: Sun, 15 Dec 2013 12:01:21 +0100 Subject: 32114: ZLE_PROMPT_INDENT allows you to move rprompt flush right --- Src/Zle/zle_tricky.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Src/Zle/zle_tricky.c') diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c index e30e0b1aa..25f09c459 100644 --- a/Src/Zle/zle_tricky.c +++ b/Src/Zle/zle_tricky.c @@ -1504,7 +1504,17 @@ get_comp_string(void) nnb = s + MB_METACHARLEN(s); else nnb = s; - for (tt = s; tt < s + zlemetacs_qsub - wb;) { + tt = s; + if (lincmd) + { + /* + * Ignore '['s at the start of a command as they're not + * matched by closing brackets. + */ + while (*tt == Inbrack && tt < s + zlemetacs_qsub - wb) + tt++; + } + while (tt < s + zlemetacs_qsub - wb) { if (*tt == Inbrack) { i++; nb = nnb; -- cgit 1.4.1