Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH v2] [[:blank:]] only matches on SPC and TAB



2018-05-13 22:25:53 +0100, Stephane Chazelas:
[...]
> In case that was not intentional, this patch should fix it:
[...]

It was missing the autoconf check:

diff --git a/Src/pattern.c b/Src/pattern.c
index fc7c737..d3eac44 100644
--- a/Src/pattern.c
+++ b/Src/pattern.c
@@ -3605,7 +3605,7 @@ mb_patmatchrange(char *range, wchar_t ch, int zmb_ind, wint_t *indptr, int *mtp)
 		    return 1;
 		break;
 	    case PP_BLANK:
-		if (ch == L' ' || ch == L'\t')
+		if (iswblank(ch))
 		    return 1;
 		break;
 	    case PP_CNTRL:
@@ -3840,7 +3840,7 @@ patmatchrange(char *range, int ch, int *indptr, int *mtp)
 		    return 1;
 		break;
 	    case PP_BLANK:
-		if (ch == ' ' || ch == '\t')
+		if (isblank(ch))
 		    return 1;
 		break;
 	    case PP_CNTRL:
diff --git a/configure.ac b/configure.ac
index d15a6cd..4f1eab8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2563,10 +2563,10 @@ AC_HELP_STRING([--enable-multibyte], [support multibyte characters]),
 [AC_CACHE_VAL(zsh_cv_c_unicode_support,
   AC_MSG_NOTICE([checking for functions supporting multibyte characters])
   [zfuncs_absent=
-   for zfunc in iswalnum iswcntrl iswdigit iswgraph iswlower iswprint \
-iswpunct iswspace iswupper iswxdigit mbrlen mbrtowc towupper towlower \
-wcschr wcscpy wcslen wcsncmp wcsncpy wcrtomb wcwidth wmemchr wmemcmp \
-wmemcpy wmemmove wmemset; do
+   for zfunc in iswalnum iswblank iswcntrl iswdigit iswgraph iswlower \
+     iswprint iswpunct iswspace iswupper iswxdigit mbrlen mbrtowc \
+     towupper towlower wcschr wcscpy wcslen wcsncmp wcsncpy wcrtomb \
+     wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset; do
      AC_CHECK_FUNC($zfunc,
      [:], [zfuncs_absent="$zfuncs_absent $zfunc"])
     done



Messages sorted by: Reverse Date, Date, Thread, Author