Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Cannot paste unicode <0221>, <0234> - <024f>
- X-seq: zsh-workers 41024
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Cannot paste unicode <0221>, <0234> - <024f>
- Date: Fri, 28 Apr 2017 14:16:50 +0100
- Cms-type: 201P
- In-reply-to: <etPan.59033168.1190cde7.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>
Probably worth checking if BROKEN_WCWIDTH is already defined in config.h
and if not what happens if you define it. It has no effect unless
one of __STDC_ISO_10646__ or __APPLE__ is also defined.
An other option is --enable-unicode9, but you'll need the appropriate
header and library support for that to work.
You might want to confirm also if it actually is wcwidth() rather than
iswprint() by hacking zle_refresh.c e.g. the following (untested). This
might be a plausible patch, actually --- if iswprint() succeeds,
presumably the printing width actually is positive (combining characters
are handled as a special case afterwards).
pws
diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c
index 8391739..835eed7 100644
--- a/Src/Zle/zle_refresh.c
+++ b/Src/Zle/zle_refresh.c
@@ -1278,8 +1278,11 @@ zrefresh(void)
#ifdef __STDC_ISO_10646__
!ZSH_INVALID_WCHAR_TEST(*t) &&
#endif
- iswprint(*t) && (width = WCWIDTH(*t)) > 0) {
+ iswprint(*t)) {
int ichars;
+ width = WCWIDTH(*t);
+ if (width <= 0)
+ width = 1;
if (width > rpms.sen - rpms.s) {
int started = 0;
/*
Messages sorted by:
Reverse Date,
Date,
Thread,
Author