zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.dk
Subject: Re: Regression in UTF-8 support
Date: Tue, 27 Sep 2005 15:22:47 +0100	[thread overview]
Message-ID: <20050927152247.6a1f6452.pws@csr.com> (raw)
In-Reply-To: <200509262253.50101.arvidjaar@newmail.ru>

Andrey Borzenkov <arvidjaar@newmail.ru> wrote:
> this fixed history truncation but not strange mangling in completion
> listing.

There were some bits I missed or got wrong when updating nicechar().

Index: Src/utils.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/utils.c,v
retrieving revision 1.94
diff -u -r1.94 utils.c
--- Src/utils.c	20 Sep 2005 16:33:01 -0000	1.94
+++ Src/utils.c	27 Sep 2005 14:19:45 -0000
@@ -260,7 +260,7 @@
      * This can't happen if the character is printed "nicely", so
      * this results in a maximum of two bytes total (plus the null).
      */
-    if (itok(c)) {
+    if (imeta(c)) {
 	*s++ = Meta;
 	*s++ = c ^ 32;
     } else
Index: Src/Zle/complist.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/complist.c,v
retrieving revision 1.71
diff -u -r1.71 complist.c
--- Src/Zle/complist.c	10 Aug 2005 13:21:16 -0000	1.71
+++ Src/Zle/complist.c	27 Sep 2005 14:19:45 -0000
@@ -570,11 +570,12 @@
 	    cc = *s++ ^ 32;
 
 	for (t = nicechar(cc); *t; t++) {
+	    int nc = (*t == Meta) ? STOUC(*++t ^ 32) : STOUC(*t);
 	    if (ml == mlend - 1 && col == columns - 1) {
 		mlprinted = ml - oml;
 		return 0;
 	    }
-	    putc(*t, shout);
+	    putc(nc, shout);
 	    if (++col == columns) {
 		ml++;
 		if (mscroll && !--mrestlines && (ask = asklistscroll(ml))) {
@@ -978,11 +979,12 @@
 	    c = *s++ ^ 32;
 
 	for (t = nicechar(c); *t; t++) {
+	    int nc = (*t == Meta) ? STOUC(*++t ^ 32) : STOUC(*t);
 	    if (ml == mlend - 1 && col == columns - 1) {
 		mlprinted = ml - oml;
 		return 0;
 	    }
-	    putc(*t, shout);
+	    putc(nc, shout);
 	    if (++col == columns) {
 		ml++;
 		if (mscroll && !--mrestlines && (ask = asklistscroll(ml))) {


-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

**********************************************************************


  reply	other threads:[~2005-09-27 14:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-25 16:05 Andrey Borzenkov
2005-09-25 21:56 ` Mikael Magnusson
2005-09-26 18:37 ` Peter Stephenson
2005-09-26 18:53   ` Andrey Borzenkov
2005-09-27 14:22     ` Peter Stephenson [this message]
2005-09-27 17:00       ` Mikael Magnusson
2005-09-28  3:04         ` Andrey Borzenkov
2005-09-28 10:15           ` Peter Stephenson
2005-09-28 10:22             ` Peter Stephenson
2005-09-28 14:45               ` Bart Schaefer

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=20050927152247.6a1f6452.pws@csr.com \
    --to=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).