about summary refs log tree commit diff
path: root/Functions/Zle/predict-on
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-02-03 17:22:40 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-02-03 17:22:40 +0000
commited41dafd3c79ebf2ce390ee9af54fe8bb21deb73 (patch)
treea45e062eb30e19f11c04c8bb7d30e36c1b77eb7e /Functions/Zle/predict-on
parent52a67fbbda1eda1e45d9aa6eed6c9650fbd6d0b1 (diff)
downloadzsh-ed41dafd3c79ebf2ce390ee9af54fe8bb21deb73.tar.gz
zsh-ed41dafd3c79ebf2ce390ee9af54fe8bb21deb73.tar.xz
zsh-ed41dafd3c79ebf2ce390ee9af54fe8bb21deb73.zip
zsh-workers/9546
Diffstat (limited to 'Functions/Zle/predict-on')
-rw-r--r--Functions/Zle/predict-on9
1 files changed, 6 insertions, 3 deletions
diff --git a/Functions/Zle/predict-on b/Functions/Zle/predict-on
index 6e67d5efa..4822c38ce 100644
--- a/Functions/Zle/predict-on
+++ b/Functions/Zle/predict-on
@@ -53,7 +53,10 @@ insert-and-predict () {
 	  unsetopt automenu recexact
 	  integer curs=$CURSOR pos nchar=${#LBUFFER//[^${KEYS[-1]}]}
 	  local -a +h comppostfuncs
-	  local crs curcontext="${curcontext}:predict"
+	  local crs curcontext="${curcontext}"
+
+          [[ -z "$curcontext" ]] && curcontext=:::
+          curcontext="${curcontext#*:}predict:"
 
 	  comppostfuncs=( predict-limit-list )
 	  zle complete-word
@@ -61,7 +64,7 @@ insert-and-predict () {
 	  # get out of that `case'.
 	  repeat 1
 	  do
-	    zstyle -s ":completion${curcontext}" cursor crs
+	    zstyle -s ":completion:${curcontext}" cursor crs
 	    case $crs in
 	    (complete)
 	      # At the place where the completion left it, if it is after
@@ -119,7 +122,7 @@ predict-limit-list() {
   then
     compstate[list]=''
     compstate[force_list]=yes
-  elif zstyle -t ":completion:predict${curcontext}" list always
+  elif zstyle -t ":completion:predict::::" list always
   then
     compstate[force_list]=yes
   fi