about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--Src/Zle/zle_tricky.c10
2 files changed, 16 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 3294a609c..ba9541c94 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-08-15  Peter Stephenson  <p.w.stephenson@ntlworld.com>
+
+	* users/14307: Src/Zle/zle_tricky.c: end of current command in
+	completion wasn't properly found when using variant zsh loop
+	or test syntax.
+
 2009-08-07  Peter Stephenson  <pws@csr.com>
 
 	* Andrew Psaltis: 27212: Completion/Linux/Command/_pkgtool:
@@ -12070,5 +12076,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.4758 $
+* $Revision: 1.4759 $
 *****************************************************
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index 1fcb4dee6..1856911dc 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -1211,7 +1211,15 @@ get_comp_string(void)
 	    (ins == 2 && i == 2) || (ins == 3 && i == 3) ||
 	    tok == BAR    || tok == AMPER     ||
 	    tok == BARAMP || tok == AMPERBANG ||
-	    ((tok == DBAR || tok == DAMPER) && !incond)) {
+	    ((tok == DBAR || tok == DAMPER) && !incond) ||
+	    /*
+	     * Special case: we might reach a new command (incmdpos set)
+	     * if we've already found the string we're completing (tt set)
+	     * without hitting one of the above if we're using one of
+	     * the special zsh forms of delimiting for conditions and
+	     * loops that I really loathe having to support.
+	     */
+	    (tt && incmdpos)) {
 	    /* This is one of the things that separate commands.  If we  *
 	     * already have the things we need (e.g. the token strings), *
 	     * leave the loop.                                           */