Commit 93dc8127 authored by Konstantin Kolosovsky's avatar Konstantin Kolosovsky Committed by intellij-monorepo-bot
Browse files

vcs: Fix IOE if editor diff preview is created and disposed during dumb mode (IDEA-233734)

(cherry picked from commit 4c178b3ae82df8cd3be7effb03e64b141a3616d5)

GitOrigin-RevId: 2bc9961c9b7022451ab55d261423f73b9cb13542
parent a4a9c36d
Branches unavailable Tags unavailable
No related merge requests found
Showing with 3 additions and 0 deletions
+3 -0
......@@ -9,6 +9,7 @@ import com.intellij.openapi.fileEditor.FileEditorManager
import com.intellij.openapi.project.DumbAwareAction
import com.intellij.openapi.project.DumbService
import com.intellij.openapi.project.Project
import com.intellij.openapi.util.Disposer.isDisposed
import com.intellij.openapi.vcs.changes.actions.diff.lst.LocalChangeListDiffTool.ALLOW_EXCLUDE_FROM_COMMIT
import com.intellij.openapi.vcs.changes.ui.ChangesTree
import com.intellij.openapi.wm.ToolWindowManager
......@@ -29,6 +30,8 @@ abstract class EditorTabPreview(private val diffProcessor: DiffRequestProcessor)
fun installOn(tree: ChangesTree) =
//do not open file aggressively on start up, do it later
DumbService.getInstance(project).smartInvokeLater {
if (isDisposed(updatePreviewQueue)) return@smartInvokeLater
tree.addSelectionListener(
Runnable {
updatePreviewQueue.queue(Update.create(this) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment