On Monday 08 August 2005 05:32, Peter Stephenson wrote: > Dan Bullok wrote: > > zsh 4.2.5 does not re-evaluate the prompt string when the window size > > changes. > > When the window size changes, it seems to me that zle should know about > > it, and redisplay the prompt appropriately. Most of the two line prompts > > get very screwed up on a window resize, and you have to hit enter for > > them to behave again. > > I'll apply this (and to 4.3 where the code is slightly different). > > > There's another closely related issue that's bugging me, which I don't > > have a fix for. When the window is resized, zsh keeps moving the prompt > > down a line at a time. This isn't a big deal, except that it often ends > > up causing the display to scroll up so that I can't see anything but the > > messed up prompt bits on screen. Is it necessary to do this when the > > display is updated? Is there a way to prevent it without messing > > everything else up? I've looked at zrefresh for a couple of hours, but > > I'm completely confused by it. > > Yes, I can see this behaviour. I'll try to remember to look and see > what's going on, unless Geoff has any ideas. I kept at this, and have made some progress I'm able to completely work around this problem by creating a new function in Src/Zle/zle_main.c called zle_resetprompt. This does the same thing that resetprompt does, only it can be called from call the zle reset-prompt from outside of zle (i.e. in ). Then you don't have to call trashzle, which seems to be the cause of the extra newlines. Instead, you call zle_resetprompt after calling zrefresh (before might work, too, but I didn't try it). This is admittedly a circuitous solution, but it's the best I could come up with given my limited understanding of zsh internals. If anyone's interested, the patch is very small, and is attached. > > By the way, our mail scanning software (blackspider) decided there was a > virus (huntsman) in your script attachment. It's presumably wrong, but > anyway the attachment got blocked. Hmmm. Everything looks okay here. Mail was sent from a hardened Linux box that gets regular inspections by rkhunter and chkrootkit. It also seems to have gone through the mailing list intact, because I got a copy (and it's the same one I sent). I think your virus scanner's probably overcautious (which isn't necessarily a bad thing). There were two attachments (patch and demo prompt). Did you get either one? If you want them, or this patch doesn't get through, and you want it, let me know how to send it to you to circumvent your scanner. -Dan