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

Re: cursor positioning with compleiton



Tanaka Akira wrote:

> I found a problem with cursor positioning with compleiton.
> 
> Z(2):akr@is27e1u11% Src/zsh -f
> is27e1u11% bindkey -e; fpath=($PWD/Completion/*(/)); autoload -U compinit; compinit -D; compdef _tst tst
> is27e1u11% compconf group_matches=yes message_format='%d' description_format='%d' describe_options=yes
> is27e1u11% _tst () { _arguments -s '-a[aaa]' '-b[bbb]' }
> is27e1u11% tst -<TAB>
> option
> -a -- aaa
> -b -- bbb
> 
> After this, the cursor are positioned in the line to define `_tst'.

So you don't use `complist'?

Bye
 Sven

diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c
--- os/Zle/zle_tricky.c	Thu Sep 16 14:21:20 1999
+++ Src/Zle/zle_tricky.c	Fri Sep 17 09:43:51 1999
@@ -8333,7 +8333,7 @@
     longest += 2 + of;
     if ((ncols = columns / longest)) {
 	for (g = amatches; g; g = g->next)
-	    nlines += (g->lcount + ncols - 1) / ncols;
+	    nlines += (g->lcount - g->llcount + ncols - 1) / ncols;
     } else {
 	ncols = 1;
 	opl = 1;

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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