From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: Mikael Magnusson <mikachu@gmail.com>
Cc: pws@csr.com, zsh-workers@sunsite.dk
Subject: Re: PATCH: displaying wide characters
Date: Wed, 26 Oct 2005 00:11:54 +0100 [thread overview]
Message-ID: <20051026001154.32458ec3.p.w.stephenson@ntlworld.com> (raw)
In-Reply-To: <237967ef0510240140g548e0c0r3deb3f4704dc313@mail.gmail.com>
On Mon, 24 Oct 2005 10:40:42 +0200
Mikael Magnusson <mikachu@gmail.com> wrote:
> Found one issue with editing wide characters on the command line,
> input some doublewidth characters, erase one near the left end, then
> go to the right and erase another. The second time the cursor will
> only move one character to the left instead of two and cursor display
> will not correspond with reality anymore. For some reason it only
> seems to happen with 6 characters or more, the ones i'm using are
> hiragana.
I think the following patch fixes this issue, at least what I was
seeing. I'm quite sure there are plenty of other oddities like this.
I also think that, while you can now type a line of double-width
characters that wraps without the display going, there are likely to be
problems when you edit the part of the line before the wrap.
Index: Src/Zle/zle_refresh.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_refresh.c,v
retrieving revision 1.33
diff -u -r1.33 zle_refresh.c
--- Src/Zle/zle_refresh.c 24 Oct 2005 16:58:43 -0000 1.33
+++ Src/Zle/zle_refresh.c 25 Oct 2005 23:09:09 -0000
@@ -1138,6 +1138,12 @@
tc_delchars(i);
ol += i;
char_ins -= i;
+#ifdef ZLE_UNICODE_SUPPORT
+ while (*ol == WEOF) {
+ ol++;
+ char_ins--;
+ }
+#endif
i = 0;
break;
}
--
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page still at http://www.pwstephenson.fsnet.co.uk/
next prev parent reply other threads:[~2005-10-25 23:12 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-19 20:31 Peter Stephenson
2005-10-19 20:41 ` Peter Stephenson
2005-10-20 0:39 ` Mikael Magnusson
2005-10-20 9:39 ` Peter Stephenson
2005-10-20 15:02 ` Bart Schaefer
2005-10-21 9:03 ` Peter Stephenson
2005-10-21 14:39 ` Bart Schaefer
2005-10-21 22:29 ` Peter Stephenson
2005-10-24 8:40 ` Mikael Magnusson
2005-10-24 9:07 ` Peter Stephenson
2005-10-24 12:41 ` Mikael Magnusson
2005-10-24 12:47 ` Peter Stephenson
2005-10-24 16:53 ` Peter Stephenson
2005-10-25 23:11 ` Peter Stephenson [this message]
2005-10-26 5:19 ` Mikael Magnusson
2005-10-26 9:17 ` Peter Stephenson
2005-10-26 14:31 ` Mikael Magnusson
2005-10-28 12:03 ` Peter Stephenson
2005-10-28 17:19 ` Mikael Magnusson
2005-10-19 22:47 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051026001154.32458ec3.p.w.stephenson@ntlworld.com \
--to=p.w.stephenson@ntlworld.com \
--cc=mikachu@gmail.com \
--cc=pws@csr.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).