mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't commit document in Expand Live Template action update (EA-139336 - assert: PsiDocumentManagerBase.commitDocument)
This commit is contained in:
+4
-8
@@ -615,14 +615,10 @@ public class TemplateManagerImpl extends TemplateManager implements Disposable {
|
||||
|
||||
Document document = offsetMap.getFile().getViewProvider().getDocument();
|
||||
assert document != null;
|
||||
if (replacement.isEmpty() && startOffset == endOffset) {
|
||||
PsiDocumentManager pdm = PsiDocumentManager.getInstance(offsetMap.getFile().getProject());
|
||||
if (ApplicationManager.getApplication().isDispatchThread()) {
|
||||
pdm.commitDocument(document);
|
||||
}
|
||||
if (pdm.isCommitted(document)) {
|
||||
return offsetMap;
|
||||
}
|
||||
if (replacement.isEmpty() &&
|
||||
startOffset == endOffset &&
|
||||
PsiDocumentManager.getInstance(offsetMap.getFile().getProject()).isCommitted(document)) {
|
||||
return offsetMap;
|
||||
}
|
||||
|
||||
OffsetsInFile hostOffsets = offsetMap.toTopLevelFile();
|
||||
|
||||
Reference in New Issue
Block a user