repo: rxvt-unicode-sixel
action: commit
revision: 
path_from: 
revision_from: f102a822cba3e6cf1e2448cf0cbe8eb07d6f369f:
path_to: 
revision_to: 
git.thebackupbox.net
rxvt-unicode-sixel
git clone git://git.thebackupbox.net/rxvt-unicode-sixel
commit f102a822cba3e6cf1e2448cf0cbe8eb07d6f369f
Author: Emanuele Giaquinta 
Date:   Thu Aug 25 18:01:28 2011 +0000

    Simplify using ecb_div_ru.

diff --git a/src/scrollbar.C b/src/scrollbar.C
index ada88a7e28049f62fa9e989de14ebffa6a4971e1..
index ..693cbd43d2231b8f4521eb2f2cc416396ce172ed 100644
--- 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-----