* BUG: listmatches called with bogus list
@ 2000-01-06 7:56 Tanaka Akira
0 siblings, 0 replies; 5+ messages in thread
From: Tanaka Akira @ 2000-01-06 7:56 UTC (permalink / raw)
To: zsh-workers
`echo =zsh<TAB>-<M-x>expand-word<CR>' shows `BUG: listmatches called
with bogus list'.
Z(2):akr@is27e1u11% Src/zsh -f
is27e1u11% bindkey -e; autoload -U compinit; compinit -D
is27e1u11% zmodload zsh/complist
is27e1u11% echo =zsh<TAB>
->
is27e1u11% echo =zsh-<M-x>expand-word<CR>
zsh zsh-3.1.5-pws-12 zsh-3.1.5-pws-3 zsh-3.1.6-pws-11
zsh-3.0.5 zsh-3.1.5-pws-14 zsh-3.1.5-pws-4 zsh-3.1.6-pws-12
zsh-3.0.6 zsh-3.1.5-pws-15 zsh-3.1.5-pws-5 zsh-3.1.6-pws-13
zsh-3.0.7 zsh-3.1.5-pws-16 zsh-3.1.5-pws-6 zsh-3.1.6-pws-2
zsh-3.1.4+ zsh-3.1.5-pws-17 zsh-3.1.5-pws-7 zsh-3.1.6-pws-3
zsh-3.1.4++ zsh-3.1.5-pws-18 zsh-3.1.5-pws-8 zsh-3.1.6-pws-4
zsh-3.1.4+3 zsh-3.1.5-pws-19 zsh-3.1.5-pws-9 zsh-3.1.6-pws-5
zsh-3.1.4+4 zsh-3.1.5-pws-20 zsh-3.1.6 zsh-3.1.6-pws-6
zsh-3.1.4+5 zsh-3.1.5-pws-21 zsh-3.1.6-bart-7 zsh-3.1.6-pws-9
zsh-3.1.5 zsh-3.1.5-pws-22 zsh-3.1.6-bart-8 zsh-3.1.6-test-1
zsh-3.1.5-4533 zsh-3.1.5-pws-23 zsh-3.1.6-dev-14 zsh-3.1.6-test-2
zsh-3.1.5-4564 zsh-3.1.5-pws-24 zsh-3.1.6-pws-1 zsh-3.1.6-test-3
zsh-3.1.5-pws-11 zsh-3.1.5-pws-25 zsh-3.1.6-pws-10 zsh.old
->
is27e1u11% echo =zsh-
BUG: listmatches called with bogus list
--
Tanaka Akira
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: BUG: listmatches called with bogus list
@ 2000-01-06 9:27 Sven Wischnowsky
0 siblings, 0 replies; 5+ messages in thread
From: Sven Wischnowsky @ 2000-01-06 9:27 UTC (permalink / raw)
To: zsh-workers
Tanaka Akira wrote:
> `echo =zsh<TAB>-<M-x>expand-word<CR>' shows `BUG: listmatches called
> with bogus list'.
Time for a bit of defensive programming, I think.
Avoiding the error message was simple but finding out how to avoid the
display bug that showed up after that...
Bye
Sven
diff -ru ../z.old/Src/Zle/compresult.c Src/Zle/compresult.c
--- ../z.old/Src/Zle/compresult.c Wed Jan 5 16:41:42 2000
+++ Src/Zle/compresult.c Thu Jan 6 10:24:36 2000
@@ -1827,9 +1827,9 @@
mod_export int
invalidate_list(void)
{
- if (showinglist == -2)
- listmatches();
if (validlist) {
+ if (showinglist == -2)
+ zrefresh();
freematches(lastmatches);
lastmatches = NULL;
hasoldlist = 0;
diff -ru ../z.old/Src/Zle/zle_misc.c Src/Zle/zle_misc.c
--- ../z.old/Src/Zle/zle_misc.c Wed Jan 5 16:41:43 2000
+++ Src/Zle/zle_misc.c Thu Jan 6 09:51:28 2000
@@ -640,7 +640,8 @@
executenamedcommand(char *prmt)
{
Thingy cmd;
- int len, l = strlen(prmt), ols = listshown, feep = 0, listed = 0, curlist = 0;
+ int len, l = strlen(prmt), feep = 0, listed = 0, curlist = 0;
+ int ols = (listshown && validlist);
char *ptr;
char *okeymap = curkeymapname;
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: BUG: listmatches called with bogus list
1995-09-05 17:40 ` Zoltan Hidvegi
@ 1995-09-07 10:42 ` Zefram
0 siblings, 0 replies; 5+ messages in thread
From: Zefram @ 1995-09-07 10:42 UTC (permalink / raw)
To: Zoltan Hidvegi; +Cc: Z Shell workers mailing list
-----BEGIN PGP SIGNED MESSAGE-----
Zoltan wrote:
>Here is the bug:
>
>% zsh -f
>bolyai% setopt autolist
>bolyai% bindkey '^[[19~' where-is
>bolyai%
>Where is: kill-_
>BUG: listmatches called with bogus list
>
>As I remember, it is somewhere in Zefram's code which causes this bug (i.e. it
>is not present in beta10).
Yup. I put in a sanity check, because of the previous bug or two that
it would catch (and because of the possibility of there being more such
bugs, of course).
In this case, the sanity check got it wrong. The list is absolutely
fine. It's just that validlist wasn't set. You can observe this: type
"ls <tab>", so that a list is formed, then do a where-is, and it will
happily list the editor function names. Here's the patch:
*** Src/zle_tricky.c.1.20 1995/08/09 05:33:48
--- Src/zle_tricky.c 1995/09/07 10:30:55
***************
*** 3704,3715 ****
{
int hw = haswhat, ip = ispattern;
char *lp = lpre, *ls = lsuf;
! int nm = nmatches;
char **am = amatches;
char *ex = expl;
haswhat = HAS_MISC;
ispattern = 0;
lpre = lsuf = "";
expl = NULL;
--- 3704,3716 ----
{
int hw = haswhat, ip = ispattern;
char *lp = lpre, *ls = lsuf;
! int nm = nmatches, vl = validlist;
char **am = amatches;
char *ex = expl;
haswhat = HAS_MISC;
ispattern = 0;
+ validlist = 1;
lpre = lsuf = "";
expl = NULL;
***************
*** 3720,3725 ****
--- 3721,3727 ----
expl = ex;
amatches = am;
nmatches = nm;
+ validlist = vl;
lpre = lp;
lsuf = ls;
ispattern = ip;
-zefram
-----BEGIN PGP SIGNATURE-----
Version: 2.6.i
iQBVAgUBME7MZmWJ8JfKi+e9AQG8DQH/VJyf9tfMEAHNfdthxCNEBaHjfIhkAjE/
6fNvRO2CtGi6DtjbWUrS2yy3hVvuovi8yB6EL1R10Q9/O+LULRpiIA==
=I40w
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: BUG: listmatches called with bogus list
1995-09-05 16:22 Zoltan Hidvegi
@ 1995-09-05 17:40 ` Zoltan Hidvegi
1995-09-07 10:42 ` Zefram
0 siblings, 1 reply; 5+ messages in thread
From: Zoltan Hidvegi @ 1995-09-05 17:40 UTC (permalink / raw)
To: zsh-workers
I wrote:
> Here is the bug:
>
> % zsh -f
> bolyai% setopt autolist
> bolyai% bindkey '^[[19~' where-is
> bolyai%
> Where is: kill-_
> BUG: listmatches called with bogus list
>
> As I remember, it is somewhere in Zefram's code which causes this bug (i.e. it
> is not present in beta10).
I forgot to mention that the the actual message cames when I press TAB or
newline.
Zoltan
^ permalink raw reply [flat|nested] 5+ messages in thread
* BUG: listmatches called with bogus list
@ 1995-09-05 16:22 Zoltan Hidvegi
1995-09-05 17:40 ` Zoltan Hidvegi
0 siblings, 1 reply; 5+ messages in thread
From: Zoltan Hidvegi @ 1995-09-05 16:22 UTC (permalink / raw)
To: zsh-workers
Here is the bug:
% zsh -f
bolyai% setopt autolist
bolyai% bindkey '^[[19~' where-is
bolyai%
Where is: kill-_
BUG: listmatches called with bogus list
As I remember, it is somewhere in Zefram's code which causes this bug (i.e. it
is not present in beta10).
Zoltan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2000-01-06 9:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-06 7:56 BUG: listmatches called with bogus list Tanaka Akira
-- strict thread matches above, loose matches on Subject: below --
2000-01-06 9:27 Sven Wischnowsky
1995-09-05 16:22 Zoltan Hidvegi
1995-09-05 17:40 ` Zoltan Hidvegi
1995-09-07 10:42 ` Zefram
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).