Introduction
Introduction Statistics Contact Development Disclaimer Help
tredraw if we scroll on resize - st - [fork] customized build of st, the simple…
git clone git://src.adamsgaard.dk/st
Log
Files
Refs
README
LICENSE
---
commit edfbc9b432bc779ec9c41f7523be52b99edeec85
parent 638a30359d26c1f84a87f0f8df17df1765068029
Author: Devin J. Pohly <[email protected]>
Date: Mon, 25 Oct 2010 16:45:13 -0400
redraw if we scroll on resize
Diffstat:
M st.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/st.c b/st.c
t@@ -170,7 +170,7 @@ static void tputtab(void);
static void tputc(char);
static void tputs(char*, int);
static void treset(void);
-static void tresize(int, int);
+static int tresize(int, int);
static void tscrollup(int, int);
static void tscrolldown(int, int);
static void tsetattr(int*, int);
t@@ -1202,7 +1202,7 @@ tputs(char *s, int len) {
tputc(*s++);
}
-void
+int
tresize(int col, int row) {
int i, x;
int minrow = MIN(row, term.row);
t@@ -1210,7 +1210,7 @@ tresize(int col, int row) {
int slide = term.c.y - row + 1;
if(col < 1 || row < 1)
- return;
+ return 0;
/* free unneeded rows */
i = 0;
t@@ -1256,6 +1256,7 @@ tresize(int col, int row) {
tmoveto(term.c.x, term.c.y);
/* reset scrolling region */
tsetscroll(0, row-1);
+ return (slide > 0);
}
void
t@@ -1650,7 +1651,8 @@ resize(XEvent *e) {
row = (xw.h - 2*BORDER) / xw.ch;
if(col == term.col && row == term.row)
return;
- tresize(col, row);
+ if(tresize(col, row))
+ draw(SCREEN_REDRAW);
ttyresize(col, row);
xresize(col, row);
}
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.