zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers <zsh-workers@sunsite.dk>
Subject: Re: UTF-8/unicode/widechar refresh bug
Date: Sat, 5 Jan 2008 13:10:19 +0000	[thread overview]
Message-ID: <20080105131019.48638031.p.w.stephenson@ntlworld.com> (raw)
In-Reply-To: <237967ef0712212103r45a56d3ci14074ceb6ae172f2@mail.gmail.com>

On Sat, 22 Dec 2007 06:03:57 +0100
"Mikael Magnusson" <mikachu@gmail.com> wrote:
> bindkey '^E' reset-prompt #or whatever key you want
> : aaaaa(enter some characters so the cursor just wraps)〜aaaaaaaa<ctrl-e>
> 
> at this point everything after the character that probably gets
> garbled in the mail disappears.

This seems to fix the problem.

Index: Src/Zle/zle_refresh.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_refresh.c,v
retrieving revision 1.50
diff -u -r1.50 zle_refresh.c
--- Src/Zle/zle_refresh.c	23 Nov 2007 00:19:23 -0000	1.50
+++ Src/Zle/zle_refresh.c	5 Jan 2008 13:09:51 -0000
@@ -1055,6 +1055,18 @@
 	ccs = lpromptw;
     }
 
+#ifdef MULTIBYTE_SUPPORT
+    /*
+     * Realign to a real character after any jiggery pokery at
+     * the start of the line.
+     */
+    while (*nl == WEOF) {
+	nl++, ccs++, vcs++;
+	if (*ol)
+	    ol++;
+    }
+#endif
+
 /* 3: main display loop - write out the buffer using whatever tricks we can */
 
     for (;;) {

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


  parent reply	other threads:[~2008-01-05 13:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-22  5:03 Mikael Magnusson
2008-01-03 17:17 ` Peter Stephenson
2008-01-05 13:10 ` Peter Stephenson [this message]
2008-01-05 16:08   ` Mikael Magnusson

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=20080105131019.48638031.p.w.stephenson@ntlworld.com \
    --to=p.w.stephenson@ntlworld.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).