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

Completion patch



-----BEGIN PGP SIGNED MESSAGE-----

The patch below is a reorganisation of some of the completion code, to
make it work out the completion list anew only when something has
actually changed.  For example, if you list the possible completions
and then start menu-completing, it will not now recreate the list when
starting to menu complete.  This is a big advantage when using slow
completions.  Some of the code is also made a little clearer (in my
opinion).

This change is a necessary prerequisite for keeping the completion list
visible when menu completing over the end of the line (and into the
list), which presently clears bits of the list as required.  I intend
to work on this task next.

The changes to zle_bindings.c increase the number of editor commands
that will not stop a menu completion.  I take the view that any command
that doesn't perform an actual editing action should be allowed.  This
set of commands now also won't invalidate a completion list, so
ZLE_MENUCMP is now a bit of a misnomer.

If you apply this patch without first applying the recent patch that
reorganised the input/history code (message 140), there may be some
fuzz required, but it will apply (AFAIK).

 -zefram

begin 600 comp.diffs.gz
M'XL("#:]^2\  VYE=P#L/&EWVT:2GYE?T9P/-DF1-B_=J\Q3',7QC'P\6][,
M;#9/ X)-"B,0@ %0M!Q[?_O6T=WH!IOR&4?)KEZ>@VY47W57=8&=3D>\R,/[
M;V)Y/HF2:93,BWOAO32>-AZGB?C;,A9B)/K;!^/10;\O!OO[V]_T>CW/F,;9
M4C+\6 Q'!X/AP6"/X3ON'[;%]FYW9R2H*>COU[],92Q+V0LO@OPO7<$M;'3%
M?YV>G']_<GIR=O*NZP/OI7DOCHK2&9;FV,6#'Y\\>?G@\;/UT:LTGYI1V*@M
MUM3@T3PJ>T$^7RYD0NM@AVZK08\>/CH3;^GY^/E#>[%TE?3"H*C6@PYL\XK]
M.N@%;#S-KQ6@:GG@XBB1>'87'GO3W(RB\S_]SQ/ @=[=Z:,G)]@%\R$MF1;P
MU/NSTD(]>9:^O93Q2<W^=G?0WW?%YM4R+>6T%R6%S!$;W.8FK_'HR8N3YV?6
M%@F$]JCA\=D]!L/D<AZEB8;B%L-I:N2P5I'% 9[1/+M3Y?)*YH!B(,^R%Z:+
M# E,X-2/W;JWSB)FE27@7L89C,KR-)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