Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: (one-liner) adjustwinsize doesn't update prompt string

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.

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. 
diff -ur zsh-4.2.5.ORIG/Src/utils.c zsh-4.2.5/Src/utils.c
--- zsh-4.2.5.ORIG/Src/utils.c	2005-03-21 12:49:00.000000000 -0600
+++ zsh-4.2.5/Src/utils.c	2005-08-06 07:43:46.000000000 -0500
@@ -1054,7 +1054,7 @@
 	winchanged =
 #endif /* TIOCGWINSZ */
 	    resetneeded = 1;
-	zrefresh();
+	trashzle();
Only in zsh-4.2.5/Src: utils.c~

Attachment: prompt_stretchy_setup
Description: application/shellscript

Messages sorted by: Reverse Date, Date, Thread, Author