Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: Menu-selection screen refresh slowness
- X-seq: zsh-workers 17237
- From: Sven Wischnowsky <wischnow@xxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: RE: Menu-selection screen refresh slowness
- Date: Mon, 27 May 2002 09:39:38 +0200
- In-reply-to: <15598.21936.357147.720741@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <15597.65133.916597.845112@xxxxxxxxxxxxxxxxxx> <6134254DE87BD411908B00A0C99B044F02E89AF2@xxxxxxxxxxxxxxxxxxxxxxx> <15598.21936.357147.720741@xxxxxxxxxxxxxxxxxx>
I wrote:
> ...
>
> I just noted this myself, sorry. The code for some of the keys doesn't
> set up the variables we need for the optimisation. We have to disable
> the faster display code for them (for now, I'll have a look at what we
> can do to improve the code). Unfortunately, we have to disable it even
> for TAB.
This allows to use it for some more keys again, including TAB.
Bart Schaefer wrote:
> ...
>
> This is *vastly* improved now, thanks, Sven. Can we get this into 4.0.5?
One problem is that this relies on 17195. I'll have a look if it can
be added.
Bye
Sven
Index: Src/Zle/complist.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/complist.c,v
retrieving revision 1.48
diff -u -r1.48 complist.c
--- Src/Zle/complist.c 24 May 2002 15:02:42 -0000 1.48
+++ Src/Zle/complist.c 27 May 2002 07:36:46 -0000
@@ -1571,6 +1571,8 @@
static int
complistmatches(Hookdef dummy, Chdata dat)
{
+ static int onlnct = -1;
+
Cmgroup oamatches = amatches;
amatches = dat->matches;
@@ -1650,11 +1652,12 @@
last_cap = (char *) zhalloc(max_caplen + 1);
*last_cap = '\0';
- if (mlbeg >= 0 && mlbeg == molbeg)
+ if (!mnew && onlnct == nlnct && mlbeg >= 0 && mlbeg == molbeg)
singledraw();
else if (!compprintlist(mselect >= 0) || !clearflag)
noselect = 1;
+ onlnct = nlnct;
molbeg = mlbeg;
mocol = mcol;
moline = mline;
@@ -1769,8 +1772,10 @@
for (x = mcols; x; x--, p++)
if (*p && *p != mtexpl && **p && mselect == (**p)->gnum)
break;
- if (x)
+ if (x) {
+ mcol = mcols - x;
break;
+ }
}
if (y < mlines)
mline = y;
@@ -1971,7 +1976,6 @@
break;
}
setwish = 1;
- molbeg = -42;
continue;
} else if (cmd == Th(z_undo)) {
int l;
@@ -2327,7 +2331,6 @@
mselect = (*(minfo.cur))->gnum;
setwish = 1;
mline = -1;
- molbeg = -42;
continue;
} else if (cmd == Th(z_reversemenucomplete) ||
!strcmp(cmd->nam, "reverse-menu-complete")) {
@@ -2336,7 +2339,6 @@
mselect = (*(minfo.cur))->gnum;
setwish = 1;
mline = -1;
- molbeg = -42;
continue;
} else if (cmd == Th(z_undefinedkey)) {
continue;
--
Sven Wischnowsky wischnow@xxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author