summary refs log tree commit diff
path: root/Completion/Base/Completer/_prefix
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2003-07-09 15:53:23 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2003-07-09 15:53:23 +0000
commitec8418cf1c2143be758236a998f39c624e4080ab (patch)
treeaec173d84c4a7662fb1704f6ed760ad20d7a31b0 /Completion/Base/Completer/_prefix
parent48dbd4a65c740f3b7f3776e49ab61dbffb8e35b2 (diff)
downloadzsh-ec8418cf1c2143be758236a998f39c624e4080ab.tar.gz
zsh-ec8418cf1c2143be758236a998f39c624e4080ab.tar.xz
zsh-ec8418cf1c2143be758236a998f39c624e4080ab.zip
18841: work around problem which caused the whole word to be removed
Diffstat (limited to 'Completion/Base/Completer/_prefix')
-rw-r--r--Completion/Base/Completer/_prefix6
1 files changed, 5 insertions, 1 deletions
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++ ))