Skip to content

Commit c46953f

Browse files
committed
disable redrawing when setting visible region to prevent flickering
1 parent 3a441d9 commit c46953f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bundles/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,7 @@ public void setVisibleRegion(int start, int length) {
768768
return;
769769
}
770770
try {
771+
setRedraw(false);
771772
// If the visible region changes, make sure collapsed regions outside of the old visible regions are expanded
772773
// and collapse everything outside the new visible region
773774
int end= computeEndOfVisibleRegion(start, length, document);
@@ -782,6 +783,8 @@ public void setVisibleRegion(int start, int length) {
782783
} catch (BadLocationException e) {
783784
ILog log= ILog.of(getClass());
784785
log.log(new Status(IStatus.WARNING, getClass(), IStatus.OK, null, e));
786+
} finally {
787+
setRedraw(true);
785788
}
786789
}
787790

0 commit comments

Comments
 (0)