diff --git a/src/main/kotlin/org/arend/tracer/ArendSuspendContext.kt b/src/main/kotlin/org/arend/tracer/ArendSuspendContext.kt index 078fbedb0..e27a7b17e 100644 --- a/src/main/kotlin/org/arend/tracer/ArendSuspendContext.kt +++ b/src/main/kotlin/org/arend/tracer/ArendSuspendContext.kt @@ -70,7 +70,9 @@ class ArendSuspendContext(traceEntry: ArendTraceEntry, contextView: ArendTraceCo } } val psiElement = getSourcePositionElement(traceEntry) - val psiText = psiElement?.text?.let(::shorten) ?: ArendBundle.message("arend.tracer.unknown.expression") + val psiText = runReadAction { + psiElement?.text?.let(::shorten) ?: ArendBundle.message("arend.tracer.unknown.expression") + } component.append(psiText, SimpleTextAttributes.REGULAR_ATTRIBUTES) setPositionText(component, positionComponents()) }