merged from irssi cvs tree
authorPekka Riikonen <priikone@silcnet.org>
Tue, 5 Jun 2001 06:08:18 +0000 (06:08 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Tue, 5 Jun 2001 06:08:18 +0000 (06:08 +0000)
apps/irssi/src/fe-text/textbuffer-view.c

index f3a74080f4d0d5bb12ebaa931bfcfd203f299acf..5cc6405a68b3c8aad3fb53b69889e321d9f28826 100644 (file)
@@ -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.. */