about summary refs log tree commit diff
path: root/Functions/Zle
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-11-03 09:06:17 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-11-03 09:06:17 +0000
commit51cb3f0a27ea185be2d703be822b2b4b23eba0b7 (patch)
tree5db1bf8f6c42192fcf99306695b4e9ce715322d6 /Functions/Zle
parent5a78f7af98401d4974b52b844994e4d783592b16 (diff)
downloadzsh-51cb3f0a27ea185be2d703be822b2b4b23eba0b7.tar.gz
zsh-51cb3f0a27ea185be2d703be822b2b4b23eba0b7.tar.xz
zsh-51cb3f0a27ea185be2d703be822b2b4b23eba0b7.zip
zsh-3.1.6-bart-8 zsh-3.1.6-bart-8
Diffstat (limited to 'Functions/Zle')
-rw-r--r--Functions/Zle/predict-on7
1 files changed, 4 insertions, 3 deletions
diff --git a/Functions/Zle/predict-on b/Functions/Zle/predict-on
index 7c4133560..3a81cb3c6 100644
--- a/Functions/Zle/predict-on
+++ b/Functions/Zle/predict-on
@@ -59,7 +59,8 @@ insert-and-predict () {
 	  zle complete-word ${(s.:.)compconfig[predict_completer]}
 	  # Decide where to leave the cursor. The dummy loop is used to
 	  # get out of that `case'.
-	  while true; do
+	  repeat 1
+	  do
 	    case $compconfig[predict_cursor] in
 	    (complete)
 	      # At the place where the completion left it, if it is after
@@ -69,7 +70,8 @@ insert-and-predict () {
 	    (key)
 	      # Or maybe at the n'th occurrence of the character typed.
 	      pos=${BUFFER[(in:nchar:)${KEYS[-1]}]}
-	      if [[ pos -gt curs ]]; then
+	      if [[ pos -gt curs ]]
+	      then
 	        CURSOR=$pos
 	        break
 	      fi
@@ -78,7 +80,6 @@ insert-and-predict () {
 	      # Or else at the previous position.
 	      CURSOR=$curs
 	    esac
-	    break
 	  done
 	fi
       fi