aboutsummaryrefslogtreecommitdiff
path: root/src/sc_editor.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2016-04-23 23:48:10 +0200
committerThomas White <taw@bitwiz.org.uk>2016-04-23 23:48:10 +0200
commit1301823d553447149114f48beed4f13b5e57619a (patch)
tree71e0e2f02d3e0bbff63cfcbd24218d97f30dce8b /src/sc_editor.c
parent94f0073b1c4fb1a6f19106c3c29400975b295f5e (diff)
Match the height of flowed frames to the window size
Diffstat (limited to 'src/sc_editor.c')
-rw-r--r--src/sc_editor.c8
1 files changed, 4 insertions, 4 deletions
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);
}