mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-130734 EditorImpl.updateGutterSize() may not lead to myGutterComponent.updateSize()
This commit is contained in:
@@ -33,7 +33,6 @@ import com.intellij.openapi.actionSystem.ex.ActionManagerEx;
|
||||
import com.intellij.openapi.actionSystem.impl.MouseGestureManager;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.ModalityState;
|
||||
import com.intellij.openapi.application.impl.LaterInvocator;
|
||||
import com.intellij.openapi.command.CommandProcessor;
|
||||
import com.intellij.openapi.command.UndoConfirmationPolicy;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
@@ -1786,22 +1785,24 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
|
||||
return StringUtil.countNewLines(c);
|
||||
}
|
||||
|
||||
private boolean updatingSize;
|
||||
private boolean updatingSize; // accessed from EDT only
|
||||
private void updateGutterSize() {
|
||||
assertIsDispatchThread();
|
||||
if (!updatingSize) {
|
||||
updatingSize = true;
|
||||
LaterInvocator.invokeLater(new Runnable() {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
myGutterComponent.updateSize();
|
||||
if (!isDisposed()) {
|
||||
myGutterComponent.updateSize();
|
||||
}
|
||||
}
|
||||
finally {
|
||||
updatingSize = false;
|
||||
}
|
||||
}
|
||||
}, ApplicationManager.getApplication().getDisposed());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user