From cd38cd40f7f81bee21c14157fc45540d538965bd Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Mon, 29 May 2000 12:42:59 +0000 Subject: matching bugs with patterns with two anchors (11634) --- Src/Zle/compresult.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Src/Zle/compresult.c') diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c index 531017afb..c55b65b0a 100644 --- a/Src/Zle/compresult.c +++ b/Src/Zle/compresult.c @@ -656,7 +656,8 @@ do_ambiguous(void) /* Sometimes the different match specs used may result in a cline * that gives an empty string. If that happened, we re-insert the * old string. Unless there were matches added with -U, that is. */ - if (!(lastend - wb) && !hasunmatched) { + + if (lastend < we && !lenchanged && !hasunmatched) { cs = wb; foredel(lastend - wb); inststrlen(old, 0, we - wb); -- cgit 1.4.1