zsh-workers
 help / color / mirror / code / Atom feed
* RE: Some problems with list scrolling and  menu selection
@ 2000-04-20 12:14 Sven Wischnowsky
  0 siblings, 0 replies; 5+ messages in thread
From: Sven Wischnowsky @ 2000-04-20 12:14 UTC (permalink / raw)
  To: zsh-workers


Andrej Borsenkow wrote:

> > > 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.
> >
> 
> Oops, but it is still IMHO wrong. The list description is lost. Before
> scrolling:
> 
> bor@itsrm2% gdiff --brief
> Completing option
> --brief                   -- output only whether files differ
> .....
> 
> Note "Completing option"
> 
> and after moving to the last line and scrolling one line down:
> 
> bor@itsrm2% gdiff --new-group-format=
> --brief                   -- output only whether files differ
> .....
> 
> Was it intended this way?

Of course. There may be other descriptions below.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Some problems with list scrolling and  menu selection
  2000-04-20 11:00 Sven Wischnowsky
@ 2000-04-20 12:03 ` Andrej Borsenkow
  0 siblings, 0 replies; 5+ messages in thread
From: Andrej Borsenkow @ 2000-04-20 12:03 UTC (permalink / raw)
  To: Sven Wischnowsky, zsh-workers

>
> > 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.
>

Oops, but it is still IMHO wrong. The list description is lost. Before
scrolling:

bor@itsrm2% gdiff --brief
Completing option
--brief                   -- output only whether files differ
.....

Note "Completing option"

and after moving to the last line and scrolling one line down:

bor@itsrm2% gdiff --new-group-format=
--brief                   -- output only whether files differ
.....

Was it intended this way?

-andrej


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Some problems with list scrolling and  menu selection
@ 2000-04-20 11:00 Sven Wischnowsky
  2000-04-20 12:03 ` Andrej Borsenkow
  0 siblings, 1 reply; 5+ messages in thread
From: Sven Wischnowsky @ 2000-04-20 11:00 UTC (permalink / raw)
  To: zsh-workers


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@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Some problems with list scrolling and  menu selection
  2000-04-20  9:35 Andrej Borsenkow
@ 2000-04-20  9:37 ` Andrej Borsenkow
  0 siblings, 0 replies; 5+ messages in thread
From: Andrej Borsenkow @ 2000-04-20  9:37 UTC (permalink / raw)
  To: Andrej Borsenkow, ZSH workers mailing list

>
> 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).

I forgot it, sorry.

bor@itsrm2% zstyle -L
zstyle ':completion:*' completer _oldlist _complete _match
zstyle ':completion:*' format 'Completing %d'
zstyle ':completion:*' group-name ''
zstyle ':completion:*' ignore-parents parent pwd
zstyle ':completion:*' insert-unambiguous true
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' list-prompt 'Showing %l'
zstyle ':completion:*' match-original both
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' 'r:|[._-]=* r:|=*'
'r:|[._-]=** r:|=**'
zstyle ':completion:*' menu 'select=0'
zstyle ':completion:*' original true
zstyle ':completion:*' verbose true
zstyle ':completion:*' old-list _match


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Some problems with list scrolling and  menu selection
@ 2000-04-20  9:35 Andrej Borsenkow
  2000-04-20  9:37 ` Andrej Borsenkow
  0 siblings, 1 reply; 5+ messages in thread
From: Andrej Borsenkow @ 2000-04-20  9:35 UTC (permalink / raw)
  To: ZSH workers mailing list

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.

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.

bor@itsrm2% gdiff -TAB
Completing option
--brief                   -- output only whether files differ
--changed-group-format    -- set changed group format
--changed-line-format     -- set changed line format
--context                 -- context diff
--ed                      -- output an ed script
--exclude                 -- exclude files matching pattern
--exclude-from            -- exclude files matching pattern in file
--expand-tabs             -- expand tabs to spaces
--help                    -- help text
--horizon-lines           -- set number of lines to keep in prefix and
suffix
--ignore-all-space        -- ignore all white space
--ignore-blank-lines      -- ignore lines that are all blank
--ignore-case             -- case insensitive
--ignore-matching-lines   -- ignore lines that match regex
--ignore-space-change     -- ignore changes in the amount of white space
--initial-tab             -- prepend a tab
--label                   -- set label to use instead of file name
--left-column             -- output only left column of common lines
--line-format             -- set line format
--mininal                 -- try to find a smaller set of changes
--new-file                -- treat absent files as empty
--new-group-format        -- set new group format
Showing 23/74

... now some TABs to start menu selection ...

bor@itsrm2% gdiff --brief
Completing option
--brief                   -- output only whether files differ
--changed-group-format    -- set changed group format
--changed-line-format     -- set changed line format
--context                 -- context diff
--ed                      -- output an ed script
--exclude                 -- exclude files matching pattern
--exclude-from            -- exclude files matching pattern in file
--expand-tabs             -- expand tabs to spaces
--help                    -- help text
--horizon-lines           -- set number of lines to keep in prefix and
suffix
--ignore-all-space        -- ignore all white space
--ignore-blank-lines      -- ignore lines that are all blank
--ignore-case             -- case insensitive
--ignore-matching-lines   -- ignore lines that match regex
--ignore-space-change     -- ignore changes in the amount of white space
--initial-tab             -- prepend a tab
--label                   -- set label to use instead of file name
--left-column             -- output only left column of common lines
--line-format             -- set line format
--mininal                 -- try to find a smaller set of changes
--new-file                -- treat absent files as empty
Scrolling active: current selection at Top

... now move to the bottom and scroll one line down ...

bor@itsrm2% gdiff --new-group-format=
--brief                   -- output only whether files differ
--changed-group-format    -- set changed group format
--changed-line-format     -- set changed line format
--context                 -- context diff
--ed                      -- output an ed script
--exclude                 -- exclude files matching pattern
--exclude-from            -- exclude files matching pattern in file
--expand-tabs             -- expand tabs to spaces
--help                    -- help text
--horizon-lines           -- set number of lines to keep in prefix and
suffix
--ignore-all-space        -- ignore all white space
--ignore-blank-lines      -- ignore lines that are all blank
--ignore-case             -- case insensitive
--ignore-matching-lines   -- ignore lines that match regex
--ignore-space-change     -- ignore changes in the amount of white space
--initial-tab             -- prepend a tab
--label                   -- set label to use instead of file name
--left-column             -- output only left column of common lines
--line-format             -- set line format
--mininal                 -- try to find a smaller set of changes
--new-file                -- treat absent files as empty
--new-group-format        -- set new group format
Scrolling active: current selection at 31%

... now move cursor one line up ...

bor@itsrm2% gdiff --new-file

--changed-group-format    -- set changed group format
--changed-line-format     -- set changed line format
--context                 -- context diff
--ed                      -- output an ed script
--exclude                 -- exclude files matching pattern
--exclude-from            -- exclude files matching pattern in file
--expand-tabs             -- expand tabs to spaces
--help                    -- help text
--horizon-lines           -- set number of lines to keep in prefix and
suffix
--ignore-all-space        -- ignore all white space
--ignore-blank-lines      -- ignore lines that are all blank
--ignore-case             -- case insensitive
--ignore-matching-lines   -- ignore lines that match regex
--ignore-space-change     -- ignore changes in the amount of white space
--initial-tab             -- prepend a tab
--label                   -- set label to use instead of file name
--left-column             -- output only left column of common lines
--line-format             -- set line format
--mininal                 -- try to find a smaller set of changes
--new-file                -- treat absent files as empty
--new-group-format        -- set new group format
Scrolling active: current selection at 29%

Note, that the line just under the prompt disappears.

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 :-)

-andrej

Have a nice DOS!
B >>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2000-04-20 12:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-20 12:14 Some problems with list scrolling and menu selection Sven Wischnowsky
  -- strict thread matches above, loose matches on Subject: below --
2000-04-20 11:00 Sven Wischnowsky
2000-04-20 12:03 ` Andrej Borsenkow
2000-04-20  9:35 Andrej Borsenkow
2000-04-20  9:37 ` Andrej Borsenkow

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).