Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Cannot paste unicode <0221>, <0234> - <024f>
- X-seq: zsh-workers 41027
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Cannot paste unicode <0221>, <0234> - <024f>
- Date: Fri, 28 Apr 2017 15:41:35 +0100
- Cms-type: 201P
- In-reply-to: <etPan.5903498f.140e0f76.15fbc@MacMini.local>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: Samsung Cambridge Solution Centre
- References: <CGME20170428111102epcas3p1cc3d86dc54fdafd8cd0e613bbaeba69b@epcas3p1.samsung.com> <etPan.59031f8e.515f007c.15fbc@MacMini.local> <20170428124439.73447db2@pwslap01u.europe.root.pri> <etPan.59033168.1190cde7.15fbc@MacMini.local> <20170428141650.7ed174d6@pwslap01u.europe.root.pri> <etPan.5903498f.140e0f76.15fbc@MacMini.local>
It might be possible to rely *only* on wcwidth() in cases where we're
using a replacement? Does anyone from the Apple world have any
opinions?
pws
diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c
index 8391739..d0384af 100644
--- a/Src/Zle/zle_refresh.c
+++ b/Src/Zle/zle_refresh.c
@@ -1278,7 +1278,15 @@ zrefresh(void)
#ifdef __STDC_ISO_10646__
!ZSH_INVALID_WCHAR_TEST(*t) &&
#endif
- iswprint(*t) && (width = WCWIDTH(*t)) > 0) {
+ /*
+ * If we are using a replacement wcwidth(), rely
+ * on it also for checking printability: width <= 0
+ * if not printable.
+ */
+#ifndef BROKEN_WCWIDTH
+ iswprint(*t) &&
+#endif
+ (width = WCWIDTH(*t)) > 0) {
int ichars;
if (width > rpms.sen - rpms.s) {
int started = 0;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author