Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:SkyNetMkII
zsh-winchanged
zle_refresh-windowchanged.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File zle_refresh-windowchanged.patch of Package zsh-winchanged
--- a/Src/Zle/zle_refresh.c +++ b/Src/Zle/zle_refresh.c @@ -187,6 +187,11 @@ /**/ mod_export int clearlist; +/* Maximum value of lprompth + nlnct for the current command */ + +/**/ +int maxheight; + /* Zle in trashed state - updates may be subtly altered */ /**/ @@ -1184,10 +1189,15 @@ zsetterm(); #ifdef TIOCGWINSZ if (winchanged) { - moveto(0, 0); + if (cursorsaved) { + tcout(TCRESTRCURSOR); + zputc(&zr_cr); + vln = vcs = 0; + } else { + moveto(0, 0); + } t0 = olnct; /* this is to clear extra lines even when */ - winchanged = 0; /* the terminal cannot TCCLEAREOD */ - listshown = 0; + listshown = 0; /* the terminal cannot TCCLEAREOD */ } #endif /* we probably should only have explicitly set attributes */ @@ -1215,6 +1225,8 @@ if (termflags & TERM_SHORT) vcs = 0; else if (!clearflag && lpromptbuf[0]) { + if ((cursorsaved = tccan(TCSAVECURSOR) && tccan(TCRESTRCURSOR))) + tcout(TCSAVECURSOR); zputs(lpromptbuf, shout); if (lpromptwof == winw) zputs("\n", shout); /* works with both hasam and !hasam */ @@ -1236,6 +1248,7 @@ width comparisons can be made with winw, height comparisons with winh */ if (termflags & TERM_SHORT) { + cursorsaved = 0; singlerefresh(tmpline, tmpll, tmpcs); goto singlelineout; } @@ -1788,6 +1801,16 @@ clearf = 0; oput_rpmpt = put_rpmpt; + if (lprompth + nlnct > maxheight) { + maxheight = lprompth + nlnct; + if (lprompth + nlnct > rwinh) { + cursorsaved = 0; + } else if (cursorsaved) { + moveto(1 - lprompth, 0); + tcout(TCSAVECURSOR); + } + } + /* move to the new cursor position */ moveto(rpms.nvln, rpms.nvcs);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor