Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: compstate[old_list]



Sven Wischnowsky wrote:
> Hm. maybe if we move the test I removed zle_main.c to this place...
> 
> Could you play with it and tell me if this is better?

So far, it's fine.  Normal menu-completion behaviour is OK, _main_complete
gets called when I expect it to, and I can engineer the `TAB continues
ad-hoc menu-completion'-type behaviour by adding

if [[ -n $compstate[old_insert] && $WIDGET = *complete(|-prefix) &&
  -n $compconfig[old_menu] ]]; then
  compstate[old_list]=keep
  if [[ $WIDGET = *reverse* ]]; then
    compstate[insert]=$(( compstate[old_insert] - 1 ))
  else
    compstate[insert]=$(( compstate[old_insert] + 1 ))
  fi
  return
fi

to _main_complete.

I'll put it in and see what happens.  Maybe I'll make a $compconfig
patch for some of these things, once I work out what they are.  Or is that
causing the danger of code bloat?

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy



Messages sorted by: Reverse Date, Date, Thread, Author