From bd7cc25590a8fd29e8fd490106ee7a7dc85d7860 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 4 Jun 2001 21:58:47 +0000 Subject: [PATCH] resizing empty windows didn't work properly git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1539 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/textbuffer-view.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/fe-text/textbuffer-view.c b/src/fe-text/textbuffer-view.c index a8d8a3f8..1af4220a 100644 --- a/src/fe-text/textbuffer-view.c +++ b/src/fe-text/textbuffer-view.c @@ -586,9 +586,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); @@ -598,6 +595,11 @@ 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.. */