diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c index 2e501f2a..a0fcfe8a 100644 --- a/src/bin/termptyesc.c +++ b/src/bin/termptyesc.c @@ -3049,6 +3049,8 @@ _handle_resize_by_chars(Termpty *ty, Eina_Unicode **ptr) evas_object_resize(wn, base_w + step_w * w, base_h + step_h * h); +#else + tytest_termio_resize(w, h); #endif termpty_resize(ty, w, h); } diff --git a/src/bin/tytest.c b/src/bin/tytest.c index bfecd047..88f14785 100644 --- a/src/bin/tytest.c +++ b/src/bin/tytest.c @@ -156,8 +156,19 @@ _tytest_checksum(Termpty *ty) Evas_Textgrid_Cell * test_textgrid_cellrow_get(Evas_Object *obj EINA_UNUSED, int y) { - assert (y >= 0 && y < TY_H); - return &_cells[y * TY_W]; + assert (y >= 0 && y < _sd.pty->h); + return &_cells[y * _sd.pty->w]; +} + +void +tytest_termio_resize(int w, int h) +{ + Evas_Textgrid_Cell *cells = realloc(_cells, + w * h * sizeof(Evas_Textgrid_Cell)); + assert (cells); + _sd.grid.w = w; + _sd.grid.h = h; + _cells = cells; } diff --git a/src/bin/tytest.h b/src/bin/tytest.h index ad02d142..57ce4fc5 100644 --- a/src/bin/tytest.h +++ b/src/bin/tytest.h @@ -15,6 +15,8 @@ test_textgrid_palette_get(const Evas_Object *obj, #define evas_object_textgrid_cellrow_get test_textgrid_cellrow_get Evas_Textgrid_Cell * test_textgrid_cellrow_get(Evas_Object *obj, int y); +void +tytest_termio_resize(int w, int h); void tytest_init(void); void tytest_shutdown(void);