Skip to content

Commit e90dad3

Browse files
committed
dont work if document change avoid exception
1 parent c88bad7 commit e90dad3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/src/main/java/com/duy/ccppcompiler/diagnostic/DiagnosticPresenter.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public DiagnosticPresenter(DiagnosticContract.View view, EditorActivity activity
5151
}
5252
}
5353

54+
@SuppressWarnings("ConstantConditions")
5455
@MainThread
5556
@Override
5657
public void onDiagnosticClick(View view, Diagnostic diagnostic) {
@@ -63,6 +64,9 @@ public void onDiagnosticClick(View view, Diagnostic diagnostic) {
6364
if (pair != null) {
6465
int index = pair.first;
6566
EditorDelegate editorDelegate = pair.second;
67+
if (editorDelegate.isChanged()) {
68+
return;
69+
}
6670

6771
mTabManager.setCurrentTab(index);
6872
editorDelegate.doCommand(new Command(Command.CommandEnum.REQUEST_FOCUS));

0 commit comments

Comments
 (0)