From b50c050613d488d507d6d4c8ff4b865db476d384 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 23 Apr 2014 18:43:46 -0400 Subject: reset the scroll region whenever the window is resized seems like this is what other terminals do --- src/display.c | 3 +++ src/term.c | 5 ----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/display.c b/src/display.c index 524dd0e..e8483f4 100644 --- a/src/display.c +++ b/src/display.c @@ -42,6 +42,9 @@ void runes_display_set_window_size(RunesTerm *t) t->rows = t->ypixel / t->fonty; t->cols = t->xpixel / t->fontx; + t->scroll_top = 0; + t->scroll_bottom = t->rows - 1; + old_cr = t->cr; /* XXX this should really use cairo_surface_create_similar_image, but when diff --git a/src/term.c b/src/term.c index 70b0df6..6ada412 100644 --- a/src/term.c +++ b/src/term.c @@ -12,11 +12,6 @@ void runes_term_init(RunesTerm *t, int argc, char *argv[]) runes_display_set_window_size(t); - /* have to initialize these here instead of in display_init because they - * depend on the window size being set */ - t->scroll_top = 0; - t->scroll_bottom = t->rows - 1; - t->loop = uv_default_loop(); runes_window_backend_start_loop(t); runes_pty_backend_start_loop(t); -- cgit v1.2.3