diff --git a/src/bin/termpty.c b/src/bin/termpty.c index 9fb7615f..90a080f6 100644 --- a/src/bin/termpty.c +++ b/src/bin/termpty.c @@ -347,8 +347,8 @@ _limit_coord(Termpty *ty) TERMPTY_RESTRICT_FIELD(ty->cursor_save[1].cy, 0, ty->h); } -static void -_termpty_resize_tabs(Termpty *ty, int old_w, int new_w) +void +termpty_resize_tabs(Termpty *ty, int old_w, int new_w) { unsigned int *new_tabs; int i; @@ -442,7 +442,7 @@ termpty_new(const char *cmd, Eina_Bool login_shell, const char *cd, goto err; } - _termpty_resize_tabs(ty, 0, w); + termpty_resize_tabs(ty, 0, w); termpty_reset_state(ty); @@ -1272,7 +1272,7 @@ termpty_resize(Termpty *ty, int new_w, int new_h) } } - _termpty_resize_tabs(ty, old_w, new_w); + termpty_resize_tabs(ty, old_w, new_w); if (effective_old_h <= ty->cursor_state.cy) effective_old_h = ty->cursor_state.cy + 1; diff --git a/src/bin/termpty.h b/src/bin/termpty.h index 26c55e2b..c6d93d37 100644 --- a/src/bin/termpty.h +++ b/src/bin/termpty.h @@ -236,6 +236,7 @@ Termcell *termpty_cellrow_get(Termpty *ty, int y, ssize_t *wret); ssize_t termpty_row_length(Termpty *ty, int y); void termpty_write(Termpty *ty, const char *input, int len); void termpty_resize(Termpty *ty, int new_w, int new_h); +void termpty_resize_tabs(Termpty *ty, int old_w, int new_w); void termpty_backlog_size_set(Termpty *ty, size_t size); ssize_t termpty_backlog_length(Termpty *ty); void termpty_backscroll_adjust(Termpty *ty, int *scroll); diff --git a/src/bin/tyfuzz.c b/src/bin/tyfuzz.c index e933c1bb..884b93cf 100644 --- a/src/bin/tyfuzz.c +++ b/src/bin/tyfuzz.c @@ -65,6 +65,7 @@ _termpty_init(Termpty *ty) ty->w = 80; ty->h = 25; ty->backsize = 50; + termpty_resize_tabs(ty, 0, ty->w); termpty_reset_state(ty); ty->screen = calloc(1, sizeof(Termcell) * ty->w * ty->h); ty->screen2 = calloc(1, sizeof(Termcell) * ty->w * ty->h);