repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: f102a822cba3e6cf1e2448cf0cbe8eb07d6f369f: path_to: revision_to:
commit f102a822cba3e6cf1e2448cf0cbe8eb07d6f369f Author: Emanuele GiaquintaDate: Thu Aug 25 18:01:28 2011 +0000 Simplify using ecb_div_ru. diff --git a/src/scrollbar.C b/src/scrollbar.C
--- a/src/scrollbar.C
+++ b/src/scrollbar.C
@@ -118,10 +118,9 @@ scrollBar_t::show (int refresh)
int sb_top = term->view_start - term->top_row;
int sb_bot = sb_top + (term->nrow - 1);
int sb_len = max (term->nrow - 1 - term->top_row, 1);
- int sb_size = (sb_bot - sb_top) * size ();
top = beg + (sb_top * size ()) / sb_len;
- bot = top + sb_size / sb_len + min_height () + (sb_size % sb_len > 0);
+ bot = top + ecb_div_ru ((sb_bot - sb_top) * size (), sb_len) + min_height ();
/* no change */
if (top == last_top
&& bot == last_bot
-----END OF PAGE-----