summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--Completion/Base/Completer/_prefix6
2 files changed, 12 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 8cc48401f..4ac17522a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-07-09  Oliver Kiddle  <opk@zsh.org>
+
+	* 18841: Completion/Base/Completer/_prefix: work around problem
+	where the unambiguous part is empty making the word be removed
+
 2003-07-09  Peter Stephenson  <pws@csr.com>
 
 	* 18839, modified c.f. 18840: Completion/Unix/Command/_nice,
@@ -25,9 +30,9 @@
 
 2003-07-07  Clint Adams  <clint@zsh.org>
 
-	* 18xxx: Completion/Unix/Command/_subversion: completion for
+	* 18831: Completion/Unix/Command/_subversion: completion for
 	svn and svnadmin.
-	* 18xxx: Completion/Debian/Command/_debsign: completion for
+	* 18832: Completion/Debian/Command/_debsign: completion for
 	debsign, by Matt Zimmerman.
 
 2003-07-04  Oliver Kiddle  <opk@zsh.org>
diff --git a/Completion/Base/Completer/_prefix b/Completion/Base/Completer/_prefix
index 3ec153245..a198f4cfb 100644
--- a/Completion/Base/Completer/_prefix
+++ b/Completion/Base/Completer/_prefix
@@ -48,7 +48,11 @@ for tmp in "$comp[@]"; do
       [[ compstate[nmatches] -gt 1 ]] && return 0
       compadd -U -i "$IPREFIX" -I "$ISUFFIX" - "${compstate[unambiguous]%$suf}x"
       compstate[list]=
-      compstate[insert]=unambiguous
+      if [[ -n $compstate[unambiguous] ]]; then
+        compstate[insert]=unambiguous
+      else
+        compstate[insert]=0
+      fi
       return 0
     fi
     (( _matcher_num++ ))