From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 733 invoked from network); 16 Aug 2005 00:47:02 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 16 Aug 2005 00:47:02 -0000 Received: (qmail 12388 invoked from network); 16 Aug 2005 00:46:56 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 16 Aug 2005 00:46:56 -0000 Received: (qmail 18045 invoked by alias); 16 Aug 2005 00:46:52 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21631 Received: (qmail 18035 invoked from network); 16 Aug 2005 00:46:51 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 16 Aug 2005 00:46:51 -0000 Received: (qmail 12076 invoked from network); 16 Aug 2005 00:46:51 -0000 Received: from acolyte.scowler.net (216.254.112.45) by a.mx.sunsite.dk with SMTP; 16 Aug 2005 00:46:48 -0000 Received: by acolyte.scowler.net (Postfix, from userid 1000) id A0F7970055; Mon, 15 Aug 2005 20:45:57 -0400 (EDT) Date: Mon, 15 Aug 2005 20:45:57 -0400 From: Clint Adams To: Peter Stephenson , zsh-workers@sunsite.dk Subject: Re: some unicode issues [was Re: PATCH: fix 4, was Re: unpatch: metafying zle line] Message-ID: <20050816004557.GA19190@scowler.net> Mail-Followup-To: Peter Stephenson , zsh-workers@sunsite.dk References: <200508121021.j7CAL18n012569@news01.csr.com> <20050815105717.723be294.pws@csr.com> <20050815150648.GA24152@scowler.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20050815150648.GA24152@scowler.net> User-Agent: Mutt/1.5.9i X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 > 한국어 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] == '\\'))