jcs
/wikipedia
/amendments
/48
browser: Fix scrollbar in updates
jcs made amendment 48 about 1 year ago
--- browser.c Wed Aug 30 17:47:55 2023
+++ browser.c Wed Aug 30 18:07:25 2023
@@ -612,10 +612,11 @@ browser_handle_menu(struct focusable *focusable, short
(*(browser->te))->destRect = te_bounds;
(*(browser->te))->viewRect = bounds;
- EraseRect(&(*(browser->te))->destRect);
+ InsetRect(&te_bounds, -1, -1);
+ EraseRect(&te_bounds);
TEUpdate(&(*(browser->te))->destRect, browser->te);
UpdateScrollbarForTE(browser->win, browser->te_scroller,
- browser->te, false);
+ browser->te, true);
} else {
/* enable debugging */
SetItemMark(view_menu, VIEW_MENU_DEBUG_ID, checkMark);
@@ -627,11 +628,12 @@ browser_handle_menu(struct focusable *focusable, short
(*(browser->debug_te))->destRect = te_bounds;
(*(browser->debug_te))->viewRect = bounds;
- EraseRect(&(*(browser->debug_te))->destRect);
+ InsetRect(&te_bounds, -1, -1);
+ EraseRect(&te_bounds);
TEUpdate(&(*(browser->debug_te))->destRect,
browser->debug_te);
UpdateScrollbarForTE(browser->win, browser->te_scroller,
- browser->debug_te, false);
+ browser->debug_te, true);
}
HUnlock(browser->debug_te);
@@ -908,15 +910,16 @@ browser_clear(struct browser *browser)
browser->links_count = 0;
browser->links_size = 0;
- TEPinScroll(0, -SHRT_MAX, browser->debug_te);
+ TEPinScroll(0, SHRT_MAX, browser->debug_te);
TESetText("", 0, browser->debug_te);
HLock(browser->debug_te);
InvalRect(&(*(browser->debug_te))->viewRect);
HUnlock(browser->debug_te);
- HLock(browser->te);
+ TEPinScroll(0, SHRT_MAX, browser->te);
TESetText("", 0, browser->te);
browser->last_printed[0] = browser->last_printed[1] = '\0';
+ HLock(browser->te);
InvalRect(&(*(browser->te))->viewRect);
HUnlock(browser->te);