diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-05-02 15:19:50 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-05-02 15:19:50 +0000 |
commit | 53d36e795b26a945048e7a87a1a91224f8e1663a (patch) | |
tree | aee8b11f48f2af1aceacd4a279f1d4b1de6ebfa6 /Src/Zle/zle_refresh.c | |
parent | 206237c8ec4b7619d9e70a75004cd1ae1066b0a0 (diff) | |
download | zsh-53d36e795b26a945048e7a87a1a91224f8e1663a.tar.gz zsh-53d36e795b26a945048e7a87a1a91224f8e1663a.tar.xz zsh-53d36e795b26a945048e7a87a1a91224f8e1663a.zip |
zsh-3.1.5-pws-17 dot-zsh-199905041932
Diffstat (limited to 'Src/Zle/zle_refresh.c')
-rw-r--r-- | Src/Zle/zle_refresh.c | 17 |
1 files changed, 12 insertions, 5 deletions
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; |