From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: Re: Lots of flickering in menu-selection, and a send-break problem
Date: Fri, 28 Apr 2000 09:37:01 +0200 (MET DST) [thread overview]
Message-ID: <200004280737.JAA20503@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Thu, 27 Apr 2000 15:47:00 +0000
Bart Schaefer wrote:
> On Apr 27, 3:27pm, Sven Wischnowsky wrote:
> } Subject: Re: PATCH: Re: Lots of flickering in menu-selection, and a send-b
> }
> } cursor-wrap-around suggested by Bart, which seemed even more sensible
> } after thinking about it. The only irritating effect is that moving
> } left when at the top-left match wraps you around to the bottom-right
> } match. Is that how pine works?
>
> Pine doesn't work very consistently in this regard; it does one thing in
> some selection lists and another thing in others. The most common rule
> for up/down seems to be not to wrap at all; and, left/right never go past
> the first/last item, so they change lines only in the middle of the list.
>
> On one screen where pine has multiple selection lists, up/down can "fall
> off" the current list and take you up or down entire categories, but left/
> right still can't go past the first/last item in the current list.
I almost thought so, and I prefer it to, I think it's a case where a
bit of inconsistency reduces the number of surprises.
So this makes it wrap around in at most one dimension.
Bye
Sven
Index: Src/Zle/complist.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/complist.c,v
retrieving revision 1.11
diff -u -r1.11 complist.c
--- Src/Zle/complist.c 2000/04/27 13:40:52 1.11
+++ Src/Zle/complist.c 2000/04/28 07:35:23
@@ -1809,12 +1809,23 @@
cmd == Th(z_downlineorhistory) ||
cmd == Th(z_downlineorsearch) ||
cmd == Th(z_vidownlineorhistory)) {
+ int omline;
+ Cmatch **op;
+
wrap = 0;
down:
+ omline = mline;
+ op = p;
+
do {
if (mline == mlines - 1) {
+ if (wrap & 2) {
+ mline = omline;
+ p = op;
+ break;
+ }
p -= mline * mcols;
mline = 0;
wrap |= 1;
@@ -1832,12 +1843,23 @@
cmd == Th(z_uplineorhistory) ||
cmd == Th(z_uplineorsearch) ||
cmd == Th(z_viuplineorhistory)) {
+ int omline;
+ Cmatch **op;
+
wrap = 0;
up:
+ omline = mline;
+ op = p;
+
do {
if (!mline) {
+ if (wrap & 2) {
+ mline = omline;
+ p = op;
+ break;
+ }
mline = mlines - 1;
p += mline * mcols;
wrap |= 1;
@@ -1948,17 +1970,22 @@
p = lp;
} else if (cmd == Th(z_forwardchar) || cmd == Th(z_viforwardchar)) {
int omcol;
- Cmatch *op;
+ Cmatch **op;
wrap = 0;
right:
omcol = mcol;
- op = *p;
+ op = p;
do {
if (mcol == mcols - 1) {
+ if (wrap & 1) {
+ p = op;
+ mcol = omcol;
+ break;
+ }
p -= mcol;
mcol = 0;
wrap |= 2;
@@ -1966,24 +1993,29 @@
mcol++;
p++;
}
- } while (!*p || (mcol != omcol && *p == op));
+ } while (!*p || (mcol != omcol && *p == *op));
wishcol = mcol;
if (wrap == 2)
goto down;
} else if (cmd == Th(z_backwardchar) || cmd == Th(z_vibackwardchar)) {
int omcol;
- Cmatch *op;
+ Cmatch **op;
wrap = 0;
left:
omcol = mcol;
- op = *p;
+ op = p;
do {
if (!mcol) {
+ if (wrap & 1) {
+ p = op;
+ mcol = omcol;
+ break;
+ }
mcol = mcols - 1;
p += mcol;
wrap |= 2;
@@ -1991,7 +2023,7 @@
mcol--;
p--;
}
- } while (!*p || (mcol != omcol && *p == op));
+ } while (!*p || (mcol != omcol && *p == *op));
wishcol = mcol;
if (wrap == 2)
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~2000-04-28 7:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-04-28 7:37 Sven Wischnowsky [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-04-27 13:27 Sven Wischnowsky
2000-04-27 15:47 ` Bart Schaefer
2000-04-27 8:53 Sven Wischnowsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200004280737.JAA20503@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).