From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18224 invoked from network); 17 Feb 2000 12:36:17 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 17 Feb 2000 12:36:17 -0000 Received: (qmail 5996 invoked by alias); 17 Feb 2000 12:36:11 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9774 Received: (qmail 5985 invoked from network); 17 Feb 2000 12:36:09 -0000 Date: Thu, 17 Feb 2000 13:36:08 +0100 (MET) Message-Id: <200002171236.NAA22416@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk Subject: PATCH: unambiguous string insertion 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@informatik.hu-berlin.de