- double const lineh = bv_->text->defaultHeight();
- double const slider_size =
- (text_height == 0) ? 1.0 : 1.0 / double(text_height);
-
- static long old_text_height;
- static double old_lineh;
- static double old_slider_size;
-
- if (text_height != old_text_height) {
- workarea_.setScrollbarBounds(0.0,
- text_height - work_height);
- old_text_height = text_height;
- }
- if (lineh != old_lineh) {
- workarea_.setScrollbarIncrements(lineh);
- old_lineh = lineh;
- }
- if (current_scrollbar_value != bv_->text->first_y
- || slider_size != old_slider_size) {
- current_scrollbar_value = bv_->text->first_y;
- workarea_.setScrollbar(current_scrollbar_value, slider_size);
- old_slider_size = slider_size;
- }
+ workarea_.setScrollbarBounds(0.0, text_height - work_height);
+ workarea_.setScrollbarIncrements(lineh);
+ current_scrollbar_value = bv_->text->first_y;
+ workarea_.setScrollbar(current_scrollbar_value, slider_size);