zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: choice of completers from _prefix
@ 2003-12-05 10:24 Oliver Kiddle
  0 siblings, 0 replies; only message in thread
From: Oliver Kiddle @ 2003-12-05 10:24 UTC (permalink / raw)
  To: zsh-workers

When _prefix was changed to do better looping over completers,
_completer_num was declared local at the top and used for the looping.
Unfortunately, _main_complete's _completer_num is used below this point
to work out a completer list for when the style lookup fails.

The result is _prefix defaulting to all completers following the last
_prefix instead of those before the current.

The simple fix below is to move the local declaration.

Oliver

Index: Completion/Base/Completer/_prefix
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Base/Completer/_prefix,v
retrieving revision 1.3
diff -u -r1.3 _prefix
--- Completion/Base/Completer/_prefix	9 Jul 2003 15:53:25 -0000	1.3
+++ Completion/Base/Completer/_prefix	5 Dec 2003 10:14:27 -0000
@@ -5,7 +5,7 @@
 [[ _matcher_num -gt 1 || -z "$SUFFIX" ]] && return 1
 
 local comp curcontext="$curcontext" tmp suf="$SUFFIX" \
-      _completer _completer_num \
+      _completer \
       _matcher _c_matcher _matchers _matcher_num
 
 zstyle -a ":completion:${curcontext}:" completer comp ||
@@ -18,7 +18,7 @@
 fi
 SUFFIX=''
 
-_completer_num=1
+local _completer_num=1
 
 for tmp in "$comp[@]"; do
   if [[ "$tmp" = *:-* ]]; then


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-12-05 10:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-05 10:24 PATCH: choice of completers from _prefix Oliver Kiddle

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).