Xinqi Bao's Git
projects
/
st.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
Do not save cursor in tresize.
[st.git]
/
st.c
diff --git
a/st.c
b/st.c
index
5198749
..
c50a202
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-2634,6
+2634,7
@@
tresize(int col, int row) {
int slide = term.c.y - row + 1;
bool *bp;
Line *orig;
int slide = term.c.y - row + 1;
bool *bp;
Line *orig;
+ TCursor c;
if(col < 1 || row < 1)
return 0;
if(col < 1 || row < 1)
return 0;
@@
-2695,6
+2696,7
@@
tresize(int col, int row) {
tmoveto(term.c.x, term.c.y);
/* Clearing both screens */
orig = term.line;
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);
do {
if(mincol < col && 0 < minrow) {
tclearregion(mincol, 0, col - 1, minrow - 1);
@@
-2702,10
+2704,10
@@
tresize(int col, int row) {
if(0 < col && minrow < row) {
tclearregion(0, minrow, col - 1, row - 1);
}
if(0 < col && minrow < row) {
tclearregion(0, minrow, col - 1, row - 1);
}
- tcursor(CURSOR_SAVE);
tswapscreen();
tcursor(CURSOR_LOAD);
} while(orig != term.line);
tswapscreen();
tcursor(CURSOR_LOAD);
} while(orig != term.line);
+ term.c = c;
return (slide > 0);
}
return (slide > 0);
}