Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: some unicode issues [was Re: PATCH: fix 4, was Re: unpatch: metafying zle line]
- X-seq: zsh-workers 21631
- From: Clint Adams <clint@xxxxxxx>
- To: Peter Stephenson <pws@xxxxxxx>, zsh-workers@xxxxxxxxxx
- 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
- In-reply-to: <20050815150648.GA24152@xxxxxxxxxxx>
- Mail-followup-to: Peter Stephenson <pws@xxxxxxx>, zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <200508121021.j7CAL18n012569@xxxxxxxxxxxxxx> <20050815105717.723be294.pws@xxxxxxx> <20050815150648.GA24152@xxxxxxxxxxx>
> 한국어 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] == '\\'))
Messages sorted by:
Reverse Date,
Date,
Thread,
Author