about summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-02-25 09:53:18 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-02-25 09:53:18 +0000
commit39b2b5eb2a3a1889e78eb2b3f101f2c529c5bf03 (patch)
treea81c50993f5d3a288524f30e45abca7ecf60fec1 /Src/Zle
parent6785dcb5c920b6be812b4d1a70ce53ed47ff2f30 (diff)
downloadzsh-39b2b5eb2a3a1889e78eb2b3f101f2c529c5bf03.tar.gz
zsh-39b2b5eb2a3a1889e78eb2b3f101f2c529c5bf03.tar.xz
zsh-39b2b5eb2a3a1889e78eb2b3f101f2c529c5bf03.zip
zsh-workers/9870
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/compresult.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c
index 64de5c744..d49c7b811 100644
--- a/Src/Zle/compresult.c
+++ b/Src/Zle/compresult.c
@@ -627,10 +627,9 @@ do_ambiguous(void)
 	cline_str(ainfo->line, 1, NULL);
 
 	/* Sometimes the different match specs used may result in a cline
-	 * that is shorter than the original string. If that happened, we
-	 * re-insert the old string. Unless there were matches added with
-	 * -U, that is. */
-	if (lastend - wb < we - wb && !hasunmatched) {
+	 * 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) {
 	    cs = wb;
 	    foredel(lastend - wb);
 	    inststrlen(old, 0, we - wb);