zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <clint@zsh.org>
To: Peter Stephenson <pws@csr.com>, zsh-workers@sunsite.dk
Subject: Re: some unicode issues [was Re: PATCH: fix 4, was Re: unpatch: metafying zle line]
Date: Mon, 15 Aug 2005 20:45:57 -0400	[thread overview]
Message-ID: <20050816004557.GA19190@scowler.net> (raw)
In-Reply-To: <20050815150648.GA24152@scowler.net>

> 한국어            Englishий/         ish中文            Ελληνικά     中文                                  
> català/             español/            Português/          Ελληνικάeek  中文ish                               
> English/             français/           Türkçe/            Русский                       
> 
> The directories with the / suffix are colored red, and the unmarked ones are uncolored.
> Display width is also miscalculated when tabbing through the completions.

This addresses that problem, though I suspect that the string should be
unmetafied elsewhere.  Yes? No?

--- orig/Src/Zle/compcore.c
+++ mod/Src/Zle/compcore.c
@@ -2465,16 +2465,23 @@
     if ((flags & CMF_FILE) && orig[0] && orig[strlen(orig) - 1] != '/') {
         struct stat buf;
         char *pb;
+	int blahl;
 
         pb = (char *) zhalloc((cm->prpre ? strlen(cm->prpre) : 0) +
                               3 + strlen(orig));
         sprintf(pb, "%s%s", (cm->prpre ? cm->prpre : "./"), orig);
 
-        if (!ztat(pb, &buf, 1)) {
+	char *blah = ztrdup(pb);
+
+	unmetafy(blah, &blahl);
+
+        if (!ztat(blah, &buf, 1)) {
             cm->mode = buf.st_mode;
             if ((cm->modec = file_type(buf.st_mode)) == ' ')
                 cm->modec = '\0';
         }
+
+	free(blah);
     }
     if ((*compqstack == '\\' && compqstack[1]) ||
 	(autoq && *compqstack && compqstack[1] == '\\'))


  parent reply	other threads:[~2005-08-16  0:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-12 10:21 PATCH: fix 4, was Re: unpatch: metafying zle line Peter Stephenson
2005-08-12 19:50 ` David Gómez
2005-08-14 15:55 ` Andrey Borzenkov
2005-08-15 17:22   ` [PATCH] fix zrefresh recursive completion call Andrey Borzenkov
2005-08-15  9:57 ` PATCH: fix 4, was Re: unpatch: metafying zle line Peter Stephenson
2005-08-15 15:06   ` some unicode issues [was Re: PATCH: fix 4, was Re: unpatch: metafying zle line] Clint Adams
2005-08-15 15:13     ` Peter Stephenson
2005-08-15 15:17       ` Peter Stephenson
2005-08-15 17:15       ` Clint Adams
2005-08-15 17:20         ` Peter Stephenson
2005-08-15 17:44           ` Clint Adams
2005-08-16  0:45     ` Clint Adams [this message]
2005-08-16  2:02       ` Wayne Davison
2005-08-18  9:56       ` 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=20050816004557.GA19190@scowler.net \
    --to=clint@zsh.org \
    --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).