From ee9962a1ae0ba5d7fa533b3fdb70cc56e4638f8e Mon Sep 17 00:00:00 2001 From: Carl-Robert Linnupuu Date: Wed, 8 Oct 2025 12:32:53 +0100 Subject: [PATCH] fix: read access exception on GoLand (fixes #1139) --- CHANGELOG.md | 1 + .../ee/carlrobert/codegpt/ui/textarea/TagProcessorFactory.kt | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 973740ce..f4cac99e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Commit Message action from disappearing [#1134](https://github.com/carlrobertoh/ProxyAI/issues/1134) +- Read access exception on GoLand [#1139](https://github.com/carlrobertoh/ProxyAI/issues/1139) ## [3.6.2-241.1] - 2025-10-03 diff --git a/src/main/kotlin/ee/carlrobert/codegpt/ui/textarea/TagProcessorFactory.kt b/src/main/kotlin/ee/carlrobert/codegpt/ui/textarea/TagProcessorFactory.kt index b5d2efe2..4a60fe30 100644 --- a/src/main/kotlin/ee/carlrobert/codegpt/ui/textarea/TagProcessorFactory.kt +++ b/src/main/kotlin/ee/carlrobert/codegpt/ui/textarea/TagProcessorFactory.kt @@ -4,6 +4,7 @@ import com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl import com.intellij.codeInsight.daemon.impl.HighlightInfo import com.intellij.lang.annotation.HighlightSeverity import com.intellij.openapi.application.ApplicationManager +import com.intellij.openapi.application.runReadAction import com.intellij.openapi.components.service import com.intellij.openapi.fileEditor.FileDocumentManager import com.intellij.openapi.progress.ProgressManager @@ -87,7 +88,7 @@ class SelectionTagProcessor( ) tagDetails.selectionModel.let { - if (it.hasSelection()) { + if (runReadAction { it.hasSelection() }) { it.removeSelection() } }