From 8ceb54fbc2f879e0e80f58c18761bd54db07e5f7 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 15 Apr 1999 18:25:40 +0000 Subject: zsh-3.1.5-pws-15 --- Src/Zle/zle_refresh.c | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) (limited to 'Src/Zle/zle_refresh.c') diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c index b9f39b70b..1f1063b8d 100644 --- a/Src/Zle/zle_refresh.c +++ b/Src/Zle/zle_refresh.c @@ -53,6 +53,11 @@ int nlnct; /**/ int showinglist; +/* Non-zero if a completion list was displayed. */ + +/**/ +int listshown; + /* Non-zero if ALWAYS_LAST_PROMPT has been used, meaning that the * * screen below the buffer display should not be cleared by * * zrefresh(), but should be by trashzle(). */ @@ -253,13 +258,23 @@ zrefresh(void) if (inlist) return; - if (clearlist) { - invalidatelist(); - moveto(0, 0); - clearflag = 0; - resetneeded = 1; - clearlist = 0; + if (clearlist && listshown) { + if (tccan(TCCLEAREOD)) { + int ovln = vln, ovcs = vcs; + + moveto(nlnct, 0); + tcout(TCCLEAREOD); + moveto(ovln, ovcs); + } else { + invalidatelist(); + moveto(0, 0); + clearflag = 0; + resetneeded = 1; + } + listshown = 0; } + clearlist = 0; + #ifdef HAVE_SELECT cost = 0; /* reset */ #endif @@ -287,6 +302,7 @@ zrefresh(void) moveto(0, 0); t0 = olnct; /* this is to clear extra lines even when */ winchanged = 0; /* the terminal cannot TCCLEAREOD */ + listshown = 0; } #endif resetvideo(); @@ -303,6 +319,7 @@ zrefresh(void) tcout(TCCLEAREOD); else cleareol = 1; /* request: clear to end of line */ + listshown = 0; } if (t0 > -1) olnct = t0; -- cgit 1.4.1