Bug 573016 - [StyledText] lines are overdrawn on vertical indent change

when vertical indent changes for a line where caret line below the
changing line, the lines below must be redrawn to update with the
changed indent. At the same time the caret must be updated to follow the
changes.

Change-Id: I8fe5403c834731a1d4a1f22125d5f109c9f6f5cc
Signed-off-by: Gayan Perera <gayanper@gmail.com>
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/180382
Tested-by: Platform Bot <platform-bot@eclipse.org>
Reviewed-by: Mickael Istria <mistria@redhat.com>
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 98bfb39..14b33ad 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
@@ -9472,7 +9472,10 @@
 		}
 	} else {
 		resetCache(lineIndex, 1);
-		if (getCaretLine() >= initialTopIndex && getCaretLine() <= initialBottomIndex) { // caret line with caret mustn't move
+		if((initialTopIndex == 0) && (initialBottomIndex == (content.getLineCount() - 1))) { // not scrollable editor
+		    setCaretLocation();
+			redrawLines(lineIndex, getBottomIndex() - lineIndex + 1, true);
+		} else if (getCaretLine() >= initialTopIndex && getCaretLine() <= initialBottomIndex) { // caret line with caret mustn't move
 			if (getCaretLine() < lineIndex) {
 				redrawLines(lineIndex, getPartialBottomIndex() - lineIndex + 1, true);
 			} else {