[4969] in Athena Bugs
Patch for "Xaw Text widget scrolling" bug
daemon@ATHENA.MIT.EDU (Jonathan I. Kamens)
Tue May 22 02:21:22 1990
Date: Tue, 22 May 90 02:20:59 -0400
From: "Jonathan I. Kamens" <jik@pit-manager.MIT.EDU>
To: xbugs@expo.lcs.mit.edu
Cc: bugs@ATHENA.MIT.EDU
The patch below at least partially solves the problem of the Xaw Text
widget failing to scroll when you're typing into it and you type past
the end of the widget.
Once again, I repeat the disclaimer that it's possible I haven't done
this in the best possible way -- I don't really understand the Text
widget internals enough to know that for sure. I submit this patch
for your consideration only -- it works for me, and it may or may not
work for you, and you may or may not think it's the best way to fix
the problem.
Jonathan Kamens USnail:
MIT Project Athena 11 Ashford Terrace
jik@Athena.MIT.EDU Allston, MA 02134
Office: 617-253-8495 Home: 617-782-0710
*** /tmp/,RCSt1000366 Tue May 22 02:20:32 1990
--- TextAction.c Tue May 22 02:15:48 1990
***************
*** 1063,1068 ****
--- 1063,1073 ----
ctx->text.insertPos =
SrcScan(ctx->text.source, ctx->text.insertPos,
XawstPositions, XawsdRight, text.length, TRUE);
+ while (ctx->text.insertPos >=
+ ctx->text.lt.info[ctx->text.lt.lines].position) {
+ _XawTextVScroll(ctx, 1);
+ _XawTextBuildLineTable(ctx, ctx->text.lt.top, FALSE);
+ }
AutoFill(ctx);
}
else
***************
*** 1117,1122 ****
--- 1122,1132 ----
ctx->text.insertPos =
SrcScan(ctx->text.source, ctx->text.insertPos,
XawstPositions, XawsdRight, text.length, TRUE);
+ }
+ while (ctx->text.insertPos >=
+ ctx->text.lt.info[ctx->text.lt.lines].position) {
+ _XawTextVScroll(ctx, 1);
+ _XawTextBuildLineTable(ctx, ctx->text.lt.top, FALSE);
}
EndAction(ctx);
}