about summary refs log tree commit diff
diff options
context:
space:
mode:
authorHan Pingtian <hanpt@linux.vnet.ibm.com>2015-09-22 05:55:23 +0800
committerPeter Stephenson <pws@zsh.org>2015-09-22 10:18:41 +0100
commitacf5bd766a7b5d656cdf1c636c8508492c1aadf4 (patch)
tree50a27114c85b651c0ba45420ee2af5634107bb6f
parentd2910fd64f584d57dbf544db8aa36ac909ea212f (diff)
downloadzsh-acf5bd766a7b5d656cdf1c636c8508492c1aadf4.tar.gz
zsh-acf5bd766a7b5d656cdf1c636c8508492c1aadf4.tar.xz
zsh-acf5bd766a7b5d656cdf1c636c8508492c1aadf4.zip
36586: fix completion match right anchor
-rw-r--r--ChangeLog8
-rw-r--r--Doc/Zsh/compwid.yo2
-rw-r--r--Src/Zle/compmatch.c6
3 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 897aa1ad6..e5ea4fd30 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,12 @@
 2015-09-22  Peter Stephenson  <p.stephenson@samsung.com>
 
-	* 36538: Han Pingtian: Doc/Zsh/compwid.yo: tweak code for match
+	* 36586: Han Pingtian: Src/Zle/compmatch.c: tweak to completion
+	matching with right anchor.
+
+	* 36545: Han Pingtian: Doc/Zsh/compwid.yo: tweak doc for match
+	anchors e and E.
+
+	* 36538: Han Pingtian: Doc/Zsh/compwid.yo: tweak doc for match
 	anchors to get correct difference between b and B.
 
 2015-09-22  Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
diff --git a/Doc/Zsh/compwid.yo b/Doc/Zsh/compwid.yo
index 303c19db5..c01763316 100644
--- a/Doc/Zsh/compwid.yo
+++ b/Doc/Zsh/compwid.yo
@@ -911,7 +911,7 @@ item(tt(E:)var(lpat)tt(=)var(tpat))(
 As tt(l), tt(L), tt(b) and tt(B), with the difference that the command
 line and trial completion patterns are anchored on the right side.
 Here an empty var(ranchor) and the tt(e) and tt(E) forms force the
-match to the end of the trial completion or command line string.
+match to the end of the command line or trial completion string.
 )
 enditem()
 
diff --git a/Src/Zle/compmatch.c b/Src/Zle/compmatch.c
index b5728a5fe..948144006 100644
--- a/Src/Zle/compmatch.c
+++ b/Src/Zle/compmatch.c
@@ -820,10 +820,12 @@ match_str(char *l, char *w, Brinfo *bpp, int bc, int *rwlp,
 			    continue;
 			else if (mp->right)
 			    t = pattern_match(mp->right,
-					      tl + mp->llen - mp->ralen,
+					      //tl + mp->llen - mp->ralen,
+					      tl + mp->llen,
 					      NULL, NULL) &&
 				pattern_match(mp->right,
-					      tw + mp->wlen - mp->ralen,
+					      //tw + mp->wlen - mp->ralen,
+					      tw + mp->wlen,
 					      NULL, NULL) &&
 				(!mp->lalen ||
 				 pattern_match(mp->left, tw + mp->wlen -