summaryrefslogtreecommitdiff
path: root/Src/prompt.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-04-22 15:08:04 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-04-22 15:08:04 +0000
commit2cec7aae44579d9d8ca8c7e728f9eb6e2840d72f (patch)
treea1725b9e9fba5cc1959b029167bd8137183cf092 /Src/prompt.c
parenta58d02fd2e11f8453b912859b2f774b6cadace4c (diff)
downloadzsh-2cec7aae44579d9d8ca8c7e728f9eb6e2840d72f.tar.gz
zsh-2cec7aae44579d9d8ca8c7e728f9eb6e2840d72f.zip
24861 (with tweaks): logic to use alternative wcwidth() if needed;
slightly improve test for overwriting with combining characters.
Diffstat (limited to 'Src/prompt.c')
-rw-r--r--Src/prompt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Src/prompt.c b/Src/prompt.c
index 63b048083..319759874 100644
--- a/Src/prompt.c
+++ b/Src/prompt.c
@@ -960,10 +960,10 @@ countprompt(char *str, int *wp, int *hp, int overf)
break;
default:
/*
- * If the character isn't printable, wcwidth() returns
+ * If the character isn't printable, WCWIDTH() returns
* -1. We assume width 1.
*/
- wcw = wcwidth(wc);
+ wcw = WCWIDTH(wc);
if (wcw >= 0)
w += wcw;
else
@@ -1177,7 +1177,7 @@ prompttrunc(int arg, int truncchar, int doprint, int endchar)
remw--;
break;
default:
- wcw = wcwidth(cc);
+ wcw = WCWIDTH(cc);
if (wcw >= 0)
remw -= wcw;
else
@@ -1249,7 +1249,7 @@ prompttrunc(int arg, int truncchar, int doprint, int endchar)
maxwidth--;
break;
default:
- wcw = wcwidth(cc);
+ wcw = WCWIDTH(cc);
if (wcw >= 0)
maxwidth -= wcw;
else