… | |
… | |
240 | { |
240 | { |
241 | scrollBar.init |= R_SB_NEXT; |
241 | scrollBar.init |= R_SB_NEXT; |
242 | init_scrollbar_stuff (); |
242 | init_scrollbar_stuff (); |
243 | } |
243 | } |
244 | |
244 | |
245 | if (TermWin.nscrolled == 0 || !update) |
245 | if (nsaved == 0 || !update) |
246 | { |
246 | { |
247 | XFillRectangle (disp, scrollBar.win, grayGC, 0, 0, |
247 | XFillRectangle (disp, scrollBar.win, grayGC, 0, 0, |
248 | SB_WIDTH_NEXT + 1, height); |
248 | SB_WIDTH_NEXT + 1, height); |
249 | XDrawRectangle (disp, scrollBar.win, blackGC, 0, |
249 | XDrawRectangle (disp, scrollBar.win, blackGC, 0, |
250 | -SB_BORDER_WIDTH, SB_WIDTH_NEXT, |
250 | -SB_BORDER_WIDTH, SB_WIDTH_NEXT, |
251 | height + SB_BORDER_WIDTH); |
251 | height + SB_BORDER_WIDTH); |
252 | XFillRectangle (disp, scrollBar.win, stippleGC, |
252 | XFillRectangle (disp, scrollBar.win, stippleGC, |
253 | SB_LEFT_PADDING, 0, SB_BUTTON_WIDTH, height); |
253 | SB_LEFT_PADDING, 0, SB_BUTTON_WIDTH, height); |
254 | } |
254 | } |
255 | |
255 | |
256 | if (TermWin.nscrolled) |
256 | if (nsaved) |
257 | { |
257 | { |
258 | if (last_top < scrollBar.top || !update) |
258 | if (last_top < scrollBar.top || !update) |
259 | XFillRectangle (disp, scrollBar.win, stippleGC, |
259 | XFillRectangle (disp, scrollBar.win, stippleGC, |
260 | SB_LEFT_PADDING, SB_PADDING + last_top, |
260 | SB_LEFT_PADDING, SB_PADDING + last_top, |
261 | SB_BUTTON_WIDTH, scrollBar.top - last_top); |
261 | SB_BUTTON_WIDTH, scrollBar.top - last_top); |