mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Do not commit document explicitly, delay indent detection until document is committed. (refix for EA-69918 because of EA-69954)
This commit is contained in:
-1
@@ -77,7 +77,6 @@ public class FormatterBasedLineIndentInfoBuilder {
|
||||
|
||||
@NotNull
|
||||
private List<Block> getBlocksStartingNewLine() {
|
||||
PsiDocumentManager.getInstance(myFile.getProject()).commitDocument(myDocument);
|
||||
FormattingModel model = myFormattingModelBuilder.createModel(myFile, mySettings);
|
||||
Block root = model.getRootBlock();
|
||||
NewLineBlocksIterator newLineBlocksIterator = new NewLineBlocksIterator(root, myDocument);
|
||||
|
||||
@@ -815,7 +815,12 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
|
||||
|
||||
private void reinitDocumentIndentOptions() {
|
||||
if (myProject != null && !myProject.isDisposed()) {
|
||||
CodeStyleSettingsManager.updateDocumentIndentOptions(myProject, myDocument);
|
||||
PsiDocumentManager.getInstance(myProject).performForCommittedDocument(myDocument, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
CodeStyleSettingsManager.updateDocumentIndentOptions(myProject, myDocument);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user