summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorGeoff Wing <gcw@users.sourceforge.net>2007-11-23 00:19:23 +0000
committerGeoff Wing <gcw@users.sourceforge.net>2007-11-23 00:19:23 +0000
commita5dd64f024524b987694b25c0225d4755860d748 (patch)
tree4873c114ba9351709af500623c8229cc45f5f9b4 /Src
parent30e6668678abec90536b97fc241d7a870738a376 (diff)
downloadzsh-a5dd64f024524b987694b25c0225d4755860d748.tar.gz
zsh-a5dd64f024524b987694b25c0225d4755860d748.tar.xz
zsh-a5dd64f024524b987694b25c0225d4755860d748.zip
24098: Fix my botch with 23924, rework out new prompts and
their lengths before use in resetvideo().
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/zle_refresh.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c
index 2dfafb932..7983c7770 100644
--- a/Src/Zle/zle_refresh.c
+++ b/Src/Zle/zle_refresh.c
@@ -446,7 +446,6 @@ zrefresh(void)
     int tmpcs, tmpll;		/* ditto cursor position and line length     */
     int tmpalloced;		/* flag to free tmpline when finished        */
     int remetafy;		/* flag that zle line is metafied            */
-    int fixprompt;		/* we still need to reexpand the prompt      */
     struct rparams rpms;
     
     /* If this is called from listmatches() (indirectly via trashzle()), and *
@@ -540,11 +539,6 @@ zrefresh(void)
 	    listshown = 0;
 	}
 #endif
-	fixprompt = trashedzle;
-	resetvideo();
-	resetneeded = 0;	/* unset */
-	oput_rpmpt = 0;		/* no right-prompt currently on screen */
-
 	/* we probably should only have explicitly set attributes */
 	tsetcap(TCALLATTRSOFF, 0);
 	tsetcap(TCSTANDOUTEND, 0);
@@ -552,6 +546,12 @@ zrefresh(void)
 	/* cheat on attribute unset */
 	txtunset(TXTBOLDFACE|TXTSTANDOUT|TXTUNDERLINE|TXTDIRTY);
 
+	if (trashedzle)
+	    reexpandprompt(); 
+	resetvideo();
+	resetneeded = 0;	/* unset */
+	oput_rpmpt = 0;		/* no right-prompt currently on screen */
+
         if (!clearflag) {
             if (tccan(TCCLEAREOD))
                 tcout(TCCLEAREOD);
@@ -562,8 +562,6 @@ zrefresh(void)
 	}
         if (t0 > -1)
             olnct = (t0 < winh) ? t0 : winh;
-	if (fixprompt)
-	    reexpandprompt(); 
         if (termflags & TERM_SHORT)
             vcs = 0;
 	else if (!clearflag && lpromptbuf[0]) {