Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Some problems with list scrolling and menu selection
- X-seq: zsh-workers 10868
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: Some problems with list scrolling and menu selection
- Date: Thu, 20 Apr 2000 13:00:30 +0200 (MET DST)
- In-reply-to: "Andrej Borsenkow"'s message of Thu, 20 Apr 2000 13:35:58 +0400
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Andrej Borsenkow wrote:
> 1. The default for starting menu selection is less than user friendly.
> Normally, menu selection is started on the second TAB (assuming more or
> less standard config; zstyle output follows). With list scrolling TAB
> first pages to the end of list and only then starts selection. I think,
> TAB should behave the same way here as well. Probably, "least surprise"
> for user would be, when TAB in list scrolling jumps to the first shown
> match (and not to the very first item in the list). Consider usage - you
> first find needed page and then select needed item there.
Hm, `less than user friendly'? See also below: the reference to
10816. Currently, the listing code is intentionally separated from the
menu-selection code to make the listing code (including scrolling)
work on (almost) every terminal.
For the jump-into-menu-selection-now: I'm not sure if this is really
more user friendly. And remember, that any widget without special
meaning stops listing and is executed right away, so:
bindkey -M listscroll '^I' .menu-select
Is that enough? If we document it?
> 2. There are problems with scrolling back in menu selection. Try GNU
> diff (with verbose on). I did it on dtterm from TriTeal TED 4.2 with
> 24x80 size.
>
> ...
>
> Note, that the line just under the prompt disappears.
A nasty off-by-one error when displaying matches with line-oriented
display strings. You probably guessed that.
> 3. Is it possible to retain current Zle line (prompt) at the top when
> listing completions? Like menu selection does it. I find it somewhat
> confusing as it is.
>
> 4. And, of course, scrolling back in completion listing :-)
Have you read 10816?
Bye
Sven
Index: Src/Zle/complist.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/complist.c,v
retrieving revision 1.4
diff -u -r1.4 complist.c
--- Src/Zle/complist.c 2000/04/19 06:49:37 1.4
+++ Src/Zle/complist.c 2000/04/20 10:53:45
@@ -1122,21 +1122,12 @@
n = lastn;
nl = lastnl;
lastused = 1;
+ pnl = 0;
} else
p = g->matches;
for (; (m = *p); p++) {
if (m->disp && (m->flags & CMF_DISPLINE)) {
- if (!lasttype && ml >= mlbeg) {
- lasttype = 2;
- lastg = g;
- lastbeg = mlbeg;
- lastml = ml;
- lastp = p;
- lastn = n;
- lastnl = nl;
- lastused = 1;
- }
if (pnl) {
if (dolistnl(ml) && compprintnl(ml))
goto end;
@@ -1147,6 +1138,16 @@
if (tccan(TCCLEAREOD))
tcout(TCCLEAREOD);
}
+ }
+ if (!lasttype && ml >= mlbeg) {
+ lasttype = 2;
+ lastg = g;
+ lastbeg = mlbeg;
+ lastml = ml;
+ lastp = p;
+ lastn = n;
+ lastnl = nl;
+ lastused = 1;
}
if (mfirstl < 0)
mfirstl = ml;
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author