summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
index 171c5fbcee..61a19676fb 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
@@ -8028,7 +8028,11 @@ boolean showLocation(Rectangle rect) {
if (rect.y <= topMargin) {
scrolled = scrollVertical(rect.y - topMargin, true);
} else if (rect.y + rect.height > clientAreaHeight) {
- scrolled = scrollVertical(rect.y + rect.height - clientAreaHeight, true);
+ if (clientAreaHeight == 0) {
+ scrolled = scrollVertical(rect.y, true);
+ } else {
+ scrolled = scrollVertical(rect.y + rect.height - clientAreaHeight, true);
+ }
}
if (clientAreaWidth > 0) {
// always make 1/4 of a page visible