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);
tputc(*s++);
}
-void
+int
tresize(int col, int row) {
int i, x;
int minrow = MIN(row, term.row);
int slide = term.c.y - row + 1;
if(col < 1 || row < 1)
- return;
+ return 0;
/* free unneeded rows */
i = 0;
tmoveto(term.c.x, term.c.y);
/* reset scrolling region */
tsetscroll(0, row-1);
+ return (slide > 0);
}
void
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);
}