Merge branch 'master' into slakkimsetti/HighDPIChangesforNeon
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 f34c6d4..c2a7623 100644
--- 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
@@ -1595,7 +1595,7 @@
 				// client area or if space is available but not used (the latter should
 				// never happen because we use claimBottomFreeSpace)
 				if (fullLineVisibleHeight < verticalIncrement) {
-					topIndex--;
+					topIndex = getVerticalScrollOffset() / verticalIncrement;
 				}
 			} else if (topIndex >= content.getLineCount()) {
 				topIndex = content.getLineCount() - 1;