Skip to content

Commit f76bd1c

Browse files
StyledText#setLineVerticalIndent: fix overlapping code minings in editor
Ensure problem annotation code minings are rendered below source lines to prevent visual overlap during vertical scrolling. Fixes: #2512
1 parent 508ad4a commit f76bd1c

File tree

1 file changed

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

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9326,14 +9326,16 @@ public void setLineVerticalIndent(int lineIndex, int verticalLineIndent) {
93269326
verticalScrollbar.setSelection(verticalScrollOffset);
93279327
verticalScrollbar.setMaximum(verticalScrollbar.getMaximum() + verticalIndentDiff);
93289328
}
9329+
resetCache(lineIndex, 1);
93299330
} else if (lineIndex > initialBottomIndex) {
93309331
if (verticalScrollbar != null) {
93319332
verticalScrollbar.setMaximum(verticalScrollbar.getMaximum() + verticalIndentDiff);
93329333
}
9334+
resetCache(lineIndex, 1);
93339335
} else {
93349336
resetCache(lineIndex, 1);
9335-
if((initialTopIndex == 0) && (initialBottomIndex == (content.getLineCount() - 1))) { // not scrollable editor
9336-
setCaretLocations();
9337+
if ((initialTopIndex == 0) && (initialBottomIndex == (content.getLineCount() - 1))) { // not scrollable editor
9338+
setCaretLocations();
93379339
redrawLines(lineIndex, getBottomIndex() - lineIndex + 1, true);
93389340
} else if (getFirstCaretLine() >= initialTopIndex && getFirstCaretLine() <= initialBottomIndex) { // caret line with caret mustn't move
93399341
if (getFirstCaretLine() < lineIndex) {

0 commit comments

Comments
 (0)