From acf5bd766a7b5d656cdf1c636c8508492c1aadf4 Mon Sep 17 00:00:00 2001 From: Han Pingtian Date: Tue, 22 Sep 2015 05:55:23 +0800 Subject: 36586: fix completion match right anchor --- ChangeLog | 8 +++++++- Doc/Zsh/compwid.yo | 2 +- Src/Zle/compmatch.c | 6 ++++-- 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 - * 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 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 - -- cgit 1.4.1