From 171e7fa4c1d9cbf0d8ff35ee795e1599913aa329 Mon Sep 17 00:00:00 2001 From: Jun-ichi Takimoto Date: Fri, 12 May 2017 12:10:13 +0900 Subject: 41090: Replace iswprint() if unicode9 is enabled. If wcwidth() or iswprint() is broken, force enable unicode9. --- Src/Zle/zle_refresh.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Src/Zle') diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c index 83917396a..d0dd1ef06 100644 --- a/Src/Zle/zle_refresh.c +++ b/Src/Zle/zle_refresh.c @@ -1278,7 +1278,7 @@ zrefresh(void) #ifdef __STDC_ISO_10646__ !ZSH_INVALID_WCHAR_TEST(*t) && #endif - iswprint(*t) && (width = WCWIDTH(*t)) > 0) { + WC_ISPRINT(*t) && (width = WCWIDTH(*t)) > 0) { int ichars; if (width > rpms.sen - rpms.s) { int started = 0; @@ -1460,7 +1460,7 @@ zrefresh(void) u = outputline; for (; u < outputline + outll; u++) { #ifdef MULTIBYTE_SUPPORT - if (iswprint(*u)) { + if (WC_ISPRINT(*u)) { int width = WCWIDTH(*u); /* Handle wide characters as above */ if (width > rpms.sen - rpms.s) { @@ -2468,7 +2468,7 @@ singlerefresh(ZLE_STRING_T tmpline, int tmpll, int tmpcs) if (tmpline[t0] == ZWC('\t')) vsiz = (vsiz | 7) + 2; #ifdef MULTIBYTE_SUPPORT - else if (iswprint(tmpline[t0]) && ((width = WCWIDTH(tmpline[t0])) > 0)) { + else if (WC_ISPRINT(tmpline[t0]) && ((width = WCWIDTH(tmpline[t0])) > 0)) { vsiz += width; if (isset(COMBININGCHARS) && IS_BASECHAR(tmpline[t0])) { while (t0 < tmpll-1 && IS_COMBINING(tmpline[t0+1])) @@ -2556,7 +2556,7 @@ singlerefresh(ZLE_STRING_T tmpline, int tmpll, int tmpcs) vp->atr = all_atr_on | all_atr_off; vp++; #ifdef MULTIBYTE_SUPPORT - } else if (iswprint(tmpline[t0]) && + } else if (WC_ISPRINT(tmpline[t0]) && (width = WCWIDTH(tmpline[t0])) > 0) { int ichars; if (isset(COMBININGCHARS) && IS_BASECHAR(tmpline[t0])) { -- cgit 1.4.1