From a5c753b3cc84da1a1fb4c9c7590a0df5ce881de5 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Tue, 5 Jun 2001 06:08:18 +0000 Subject: [PATCH] merged from irssi cvs tree --- apps/irssi/src/fe-text/textbuffer-view.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/irssi/src/fe-text/textbuffer-view.c b/apps/irssi/src/fe-text/textbuffer-view.c index f3a74080..5cc6405a 100644 --- a/apps/irssi/src/fe-text/textbuffer-view.c +++ b/apps/irssi/src/fe-text/textbuffer-view.c @@ -588,9 +588,6 @@ void textbuffer_view_resize(TEXT_BUFFER_VIEW_REC *view, int width, int height) g_return_if_fail(view != NULL); g_return_if_fail(width > 0); - if (view->buffer->lines == NULL) - return; - if (view->width != width) { /* line cache needs to be recreated */ textbuffer_cache_unref(view->cache); @@ -600,6 +597,12 @@ void textbuffer_view_resize(TEXT_BUFFER_VIEW_REC *view, int width, int height) view->width = width; view->height = height; + + if (view->buffer->lines == NULL) { + view->empty_linecount = height; + return; + } + textbuffer_view_init_bottom(view); /* check that we didn't scroll lower than bottom startline.. */ -- 2.43.0