reflow: don't let resize to 1x1

this occurs on terminolog start. dunno why ftm but it annoys me
This commit is contained in:
Boris Faure 2013-03-29 21:42:37 +01:00
parent 57032d607e
commit fc7dcbdad6
1 changed files with 4 additions and 2 deletions

View File

@ -473,7 +473,6 @@ ssize_t termpty_line_length(const Termcell *cells, ssize_t nb_cells)
{
ssize_t len = nb_cells;
for (len = nb_cells - 1; len >= 0; len--)
{
const Termcell *cell = cells + len;
@ -1066,10 +1065,13 @@ void
termpty_resize(Termpty *ty, int w, int h)
{
Termcell *olds, *olds2;
int y, ww, hh, oldw, oldh;
int oldw, oldh;
if ((ty->w == w) && (ty->h == h)) return;
if (w == h && h == 1) // fuck off
return;
olds = ty->screen;
olds2 = ty->screen2;
oldw = ty->w;