This patch fixes the bug introduced in
8f11e1cd034ff28ca47bb4955505db7fa8016ba8
To reproduce the bug:
1. Save cursor: printf '\e[s'
2. Load cursor: printf '\e[u'
3. Resize st window.
4. Load cursor again: printf '\e[u'
int slide = term.c.y - row + 1;
bool *bp;
Line *orig;
+ TCursor c;
if(col < 1 || row < 1)
return 0;
tmoveto(term.c.x, term.c.y);
/* Clearing both screens */
orig = term.line;
+ c = term.c;
do {
if(mincol < col && 0 < minrow) {
tclearregion(mincol, 0, col - 1, minrow - 1);
if(0 < col && minrow < row) {
tclearregion(0, minrow, col - 1, row - 1);
}
- tcursor(CURSOR_SAVE);
tswapscreen();
tcursor(CURSOR_LOAD);
} while(orig != term.line);
+ term.c = c;
return (slide > 0);
}