1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 09:58:01 +00:00

Scroll bar no longer glitches when a new line is added to the window.

[originally from svn r66]
This commit is contained in:
Ben Harris 1999-03-02 14:52:35 +00:00
parent d763b173be
commit 0ce1d562c6

View File

@ -1,4 +1,4 @@
/* $Id: macterm.c,v 1.1.2.10 1999/03/01 23:43:29 ben Exp $ */ /* $Id: macterm.c,v 1.1.2.11 1999/03/02 14:52:35 ben Exp $ */
/* /*
* Copyright (c) 1999 Ben Harris * Copyright (c) 1999 Ben Harris
* All rights reserved. * All rights reserved.
@ -382,11 +382,12 @@ void free_ctx(struct mac_session *ctx) {
void set_sbar(int total, int start, int page) { void set_sbar(int total, int start, int page) {
struct mac_session *s = onlysession; struct mac_session *s = onlysession;
SetControlMinimum(s->scrollbar, 0); /* We don't redraw until we've set everything up, to avoid glitches */
SetControlMaximum(s->scrollbar, total - page); (*s->scrollbar)->contrlMin = 0;
(*s->scrollbar)->contrlMax = total - page;
SetControlValue(s->scrollbar, start); SetControlValue(s->scrollbar, start);
#if 0 #if 0
/* XXX: This doesn't link for me - bjh */ /* XXX: This doesn't link for me. */
if (mac_gestalts.cntlattr & gestaltControlMgrPresent) if (mac_gestalts.cntlattr & gestaltControlMgrPresent)
SetControlViewSize(s->scrollbar, page); SetControlViewSize(s->scrollbar, page);
#endif #endif