Skip to content

Commit 9892ab9

Browse files
tobias-melcherakurtakov
authored andcommitted
don't modify topIndex in handleTextChanged if control has not the focus
1 parent 2ece1af commit 9892ab9

File tree

1 file changed

+1
-1
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom

1 file changed

+1
-1
lines changed

bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6046,7 +6046,7 @@ void handleTextChanged(TextChangedEvent event) {
60466046
}
60476047
int firstLine = content.getLineAtOffset(lastTextChangeStart);
60486048
resetCache(firstLine, 0);
6049-
if (!isFixedLineHeight() && topIndex > firstLine) {
6049+
if (!isFixedLineHeight() && isFocusControl() && topIndex > firstLine) {
60506050
topIndex = firstLine;
60516051
if (topIndex < 0) {
60526052
// TODO: This logging is in place to determine why topIndex is getting set to negative values.

0 commit comments

Comments
 (0)