From 1301823d553447149114f48beed4f13b5e57619a Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sat, 23 Apr 2016 23:48:10 +0200 Subject: Match the height of flowed frames to the window size --- src/sc_editor.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/sc_editor.c') diff --git a/src/sc_editor.c b/src/sc_editor.c index e54e60a..625067f 100644 --- a/src/sc_editor.c +++ b/src/sc_editor.c @@ -100,10 +100,6 @@ static void update_size(SCEditor *e) double total = total_height(e->top); - if ( total == 0.0 ) { - total = 1000.0; /* FIXME: Height of window */ - } - e->w = e->top->w; e->h = total + e->top->pad_t + e->top->pad_b; @@ -115,6 +111,10 @@ static void update_size(SCEditor *e) e->top->h = e->log_h; } + if ( e->flow && (e->top->h < e->visible_height) ) { + e->top->h = e->visible_height; + } + set_vertical_params(e); set_horizontal_params(e); } -- cgit v1.2.3