From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@sunsite.dk
Subject: Re: ZLE redraw bug
Date: Fri, 28 Mar 2008 23:16:00 +0000 [thread overview]
Message-ID: <20080328231600.29033f92@pws-pc> (raw)
In-Reply-To: <17393e3e0803270047s66f47a34k4cdd8d3186e01151@mail.gmail.com>
On Thu, 27 Mar 2008 03:47:50 -0400
"Matt Wozniski" <godlygeek@gmail.com> wrote:
> OK, this has been bugging me for a while, and was still an issue with
> 4.3.5 dev 4, so I finally sat down to try to get a manageable test
> case for it. Hopefully this is small enough. :)
Thanks for removing my excuse for not looking at it. You must know how
much I enjoy complist.c. (If anyone doesn't, I would be delighted to
refresh their memory.)
As always I don't really understand very much around here, but the point
at which it's going wrong is when it's refreshing the screen to clear up
the list. It seems that it needs a bit of prodding in the right
direction to realise that it should be reinitialising the list rather
than using what it last printed. I think.
I'll commit this because I do *not* want to think any more about it;
everyone is encouraged to give the menu selection code a good work out.
Index: Src/Zle/complist.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/complist.c,v
retrieving revision 1.108
diff -u -r1.108 complist.c
--- Src/Zle/complist.c 28 Feb 2008 23:12:37 -0000 1.108
+++ Src/Zle/complist.c 28 Mar 2008 23:14:08 -0000
@@ -53,7 +53,7 @@
* selected: Used to signal between domenucomplete() and menuselect()
* that a selected entry has been found. Or something.
* mlbeg: The first line of the logical array of all matches that
- * fits on screen.
+ * fits on screen. Setting this to -1 forces a redraw.
* mlend: The line after the last that fits on screen.
* mscroll: 1 if the scrolling prompt is shown on screen.
* mrestlines: The number of screen lines remaining to be processed.
@@ -3216,6 +3216,15 @@
}
}
if (!noselect && (!dat || acc)) {
+ /*
+ * I added the following because in certain cases the zrefresh()
+ * here was screwing up the list. Forcing it to redraw the
+ * screen worked. The case in question (courtesy of
+ * "Matt Wozniski" <godlygeek@gmail.com>) is in zsh-workers/24756.
+ *
+ * *** PLEASE DON'T ASK ME WHY THIS IS NECESSARY ***
+ */
+ mlbeg = -1;
showinglist = ((validlist && !nolist) ? -2 : 0);
onlyexpl = oe;
if (!smatches)
--
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
prev parent reply other threads:[~2008-03-28 23:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-27 7:47 Matt Wozniski
2008-03-28 23:16 ` Peter Stephenson [this message]
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=20080328231600.29033f92@pws-pc \
--to=p.w.stephenson@ntlworld.com \
--cc=zsh-workers@sunsite.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).