Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: unambiguous string insertion
- X-seq: zsh-workers 9774
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: unambiguous string insertion
- Date: Thu, 17 Feb 2000 13:36:08 +0100 (MET)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
While playing with _multi_parts some more I noticed that it inserted
unambiguous strings such as `.' or `..'. This patch avoids silly
things like these again.
Bye
Sven
diff -ru ../z.old/Src/Zle/compresult.c Src/Zle/compresult.c
--- ../z.old/Src/Zle/compresult.c Thu Feb 17 12:57:50 2000
+++ Src/Zle/compresult.c Thu Feb 17 13:30:04 2000
@@ -64,7 +64,8 @@
q = p;
}
if (!e && q && !q->orig && !q->olen && (q->flags & CLF_MISS) &&
- !(q->flags & CLF_MATCHED) && (q->word ? q->wlen : q->llen) < 3) {
+ (!(q->flags & CLF_MATCHED) || (!q->prefix && !q->suffix)) &&
+ (q->word ? q->wlen : q->llen) < 3) {
q->word = q->line = NULL;
q->wlen = q->llen = 0;
}
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author