]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Fix flaky scrollbar update when scrollback was reset to bottom.
authorSimon Tatham <anakin@pobox.com>
Tue, 18 Sep 2001 19:04:21 +0000 (19:04 +0000)
committerSimon Tatham <anakin@pobox.com>
Tue, 18 Sep 2001 19:04:21 +0000 (19:04 +0000)
[originally from svn r1275]

terminal.c

index f238f09e892d5e1a3b3f748ad4681ed15983459b..5245cdb70952f21ac2fed8ea16ccbe449e06aad9 100644 (file)
@@ -319,13 +319,15 @@ void term_update(void)
     Context ctx;
     ctx = get_ctx();
     if (ctx) {
-       if (seen_disp_event)
-           update_sbar();
+       int need_sbar_update = seen_disp_event;
        if ((seen_key_event && (cfg.scroll_on_key)) ||
            (seen_disp_event && (cfg.scroll_on_disp))) {
            disptop = 0;               /* return to main screen */
            seen_disp_event = seen_key_event = 0;
+           need_sbar_update = TRUE;
        }
+       if (need_sbar_update)
+           update_sbar();
        do_paint(ctx, TRUE);
        sys_cursor(curs.x, curs.y - disptop);
        free_ctx(ctx);