about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@zsh.org>2022-06-03 20:08:15 -0700
committerBart Schaefer <schaefer@zsh.org>2022-06-03 20:08:15 -0700
commit3e3cfabcc74dc79d4d8717c4e5859d8d01be6c54 (patch)
treebcedb379eb8a3a99aec145e86ff690fd9f25084b
parent22b1a91c2a07e6d6a57975a1ab47d66f92aa21f2 (diff)
downloadzsh-3e3cfabcc74dc79d4d8717c4e5859d8d01be6c54.tar.gz
zsh-3e3cfabcc74dc79d4d8717c4e5859d8d01be6c54.tar.xz
zsh-3e3cfabcc74dc79d4d8717c4e5859d8d01be6c54.zip
50325: revert 38150 and fix in calling function cfp_matcher_range() instead
-rw-r--r--ChangeLog5
-rw-r--r--Src/Zle/compmatch.c2
-rw-r--r--Src/Zle/computil.c2
3 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 780f967f6..839beb4f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,11 @@
 	* 50306: Src/jobs.c, Src/signals.c, Test/A05execution.ztst: fix
 	wait builtin for child that has been stopped and continued.
 
+2022-06-02  Bart Schaefer  <schaefer@zsh.org>
+
+	* 50325: Src/Zle/compmatch.c, Src/Zle/computil.c: revert 38150 and
+	fix in calling function cfp_matcher_range() instead
+
 2022-05-30  Bart Schaefer  <schaefer@zsh.org>
 
 	* Marlon Richert: 50307 (cf. PWS 50205):
diff --git a/Src/Zle/compmatch.c b/Src/Zle/compmatch.c
index bb8359f1d..56e5509a4 100644
--- a/Src/Zle/compmatch.c
+++ b/Src/Zle/compmatch.c
@@ -1319,7 +1319,7 @@ pattern_match_equivalence(Cpattern lp, convchar_t wind, int wmtp,
     convchar_t lchr;
     int lmtp;
 
-    if (!PATMATCHINDEX(lp->u.str, wind, &lchr, &lmtp)) {
+    if (!PATMATCHINDEX(lp->u.str, wind-1, &lchr, &lmtp)) {
 	/*
 	 * No equivalent.  No possible match; give up.
 	 */
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index 59abb4cc4..77ccdebf7 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -4383,7 +4383,7 @@ cfp_matcher_range(Cmatcher *ms, char *add)
 			 * word pattern.
 			 */
 			if ((ind = pattern_match_equivalence
-			     (m->word, ind, mt, addc)) != CHR_INVALID) {
+			     (m->word, ind+1, mt, addc)) != CHR_INVALID) {
 			    if (ret) {
 				if (imeta(ind)) {
 				    *p++ = Meta;