Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Re: Lots of flickering in menu-selection, and a send-break problem
- X-seq: zsh-workers 10992
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- 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)
- In-reply-to: "Bart Schaefer"'s message of Thu, 27 Apr 2000 15:47:00 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
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@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author