From 09914c98f2f814012625762e20f71c85a52886c5 Mon Sep 17 00:00:00 2001 From: ayin Date: Mon, 18 Feb 2008 11:42:23 +0000 Subject: [PATCH] Rename some variables. --- src/scrollbar.C | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/scrollbar.C b/src/scrollbar.C index 5cb4ef96..a1443b8a 100644 --- a/src/scrollbar.C +++ b/src/scrollbar.C @@ -106,22 +106,22 @@ rxvt_term::resize_scrollbar () * Update current scrollbar view w.r.t. slider heights, etc. */ int -rxvt_term::scrollbar_show (int update) +rxvt_term::scrollbar_show (int refresh) { int ret = 0; if (!scrollBar.state) return 0; - if (update) + if (refresh) { - int top = view_start - top_row; - int bot = top + (nrow - 1); - int len = max (nrow - 1 - top_row, 1); - int size = (bot - top) * scrollBar.size (); + int sb_top = view_start - top_row; + int sb_bot = sb_top + (nrow - 1); + int sb_len = max (nrow - 1 - top_row, 1); + int sb_size = (sb_bot - sb_top) * scrollBar.size (); - scrollBar.top = (scrollBar.beg + (top * scrollBar.size ()) / len); - scrollBar.len = size / len + scrollBar.min_height () + (size % len > 0); + scrollBar.top = (scrollBar.beg + (sb_top * scrollBar.size ()) / sb_len); + scrollBar.len = sb_size / sb_len + scrollBar.min_height () + (sb_size % sb_len > 0); scrollBar.bot = (scrollBar.top + scrollBar.len); /* no change */ if (scrollBar.top == scrollBar.last_top @@ -131,7 +131,7 @@ rxvt_term::scrollbar_show (int update) return 0; } - ret = (this->*scrollBar.update) (update, scrollBar.last_top, scrollBar.last_bot, scrollBar.len); + ret = (this->*scrollBar.update) (refresh, scrollBar.last_top, scrollBar.last_bot, scrollBar.len); scrollBar.last_top = scrollBar.top; scrollBar.last_bot = scrollBar.bot; -- 2.34.1