From 53d36e795b26a945048e7a87a1a91224f8e1663a Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Sun, 2 May 1999 15:19:50 +0000 Subject: zsh-3.1.5-pws-17 --- Src/Zle/zle_refresh.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'Src/Zle/zle_refresh.c') diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c index 6b0239961..2377b70fa 100644 --- a/Src/Zle/zle_refresh.c +++ b/Src/Zle/zle_refresh.c @@ -96,6 +96,7 @@ static int more_start, /* more text before start of screen? */ olnct, /* previous number of lines */ ovln, /* previous video cursor position line */ lpromptw, rpromptw, /* prompt widths on screen */ + lpromptwof, /* left prompt width with real end position */ lprompth, /* lines taken up by the prompt */ rprompth, /* right prompt height */ vcs, vln, /* video cursor position column & line */ @@ -141,8 +142,14 @@ resetvideo(void) *obuf[ln] = '\0'; } - countprompt(lpromptbuf, &lpromptw, &lprompth); - countprompt(rpromptbuf, &rpromptw, &rprompth); + countprompt(lpromptbuf, &lpromptwof, &lprompth, 1); + countprompt(rpromptbuf, &rpromptw, &rprompth, 0); + if (lpromptwof != winw) + lpromptw = lpromptwof; + else { + lpromptw = 0; + lprompth++; + } if (lpromptw) { memset(nbuf[0], ' ', lpromptw); @@ -271,7 +278,7 @@ zrefresh(void) clearflag = 0; resetneeded = 1; } - listshown = 0; + listshown = showinglist = 0; } clearlist = 0; @@ -327,7 +334,7 @@ zrefresh(void) vcs = 0; else if (!clearflag && lpromptbuf[0]) { zputs(lpromptbuf, shout); - if (lpromptw == 0 && lprompth == 1) + if (lpromptwof == winw) zputs("\n", shout); /* works with both hasam and !hasam */ } if (clearflag) { @@ -947,7 +954,7 @@ tc_rightcurs(int cl) zputc('\r', shout); tc_upcurs(lprompth - 1); zputs(lpromptbuf, shout); - if (lpromptw == 0 && lprompth == 1) + if (lpromptwof == winw) zputs("\n", shout); /* works with both hasam and !hasam */ } i = lpromptw; -- cgit 1.4.1