aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Brychcy2018-06-29 14:37:43 -0400
committerTill Brychcy2018-06-29 14:39:14 -0400
commitf003ab675177307cdd8997de9d424f5727e137a8 (patch)
tree30702da4eaf4caaf7269e326f4e722df92773595
parent849161b4f527a1b113649b95399777bfa020061f (diff)
downloadeclipse.platform.text-f003ab675177307cdd8997de9d424f5727e137a8.tar.gz
eclipse.platform.text-f003ab675177307cdd8997de9d424f5727e137a8.tar.xz
eclipse.platform.text-f003ab675177307cdd8997de9d424f5727e137a8.zip
Bug 536206 - Improve minimap performance on MacI20180702-2000
Change-Id: I7a40e2166ef460dfc201d3e713adf7f9e2eefb88 Signed-off-by: Till Brychcy <register.eclipse@brychcy.de>
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/views/minimap/MinimapWidget.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/views/minimap/MinimapWidget.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/views/minimap/MinimapWidget.java
index 2fd40a493..8df7e1955 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/views/minimap/MinimapWidget.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/views/minimap/MinimapWidget.java
@@ -191,7 +191,7 @@ public class MinimapWidget {
FontData fontDatum = fontData[0];
scaledFont = new Font(editorFont.getDevice(), fontDatum.getName(),
- Math.round(fontDatum.getHeight() * getScale()), fontDatum.getStyle());
+ (int) Math.ceil(fontDatum.getHeight() * getScale()), fontDatum.getStyle());
fScaledFonts.put(editorFont, scaledFont);
return scaledFont;
}
@@ -209,7 +209,11 @@ public class MinimapWidget {
@Override
public void viewportChanged(int verticalOffset) {
- updateMinimap();
+ fMinimapTextWidget.getDisplay().asyncExec(() -> {
+ if (!fMinimapTextWidget.isDisposed()) {
+ updateMinimap();
+ }
+ });
}
void updateMinimap() {