Fix unexpected loading for script configurations during branch switch
This commit is contained in:
+5
@@ -62,6 +62,11 @@ internal class ScriptChangesNotifier(
|
|||||||
val document = event.document
|
val document = event.document
|
||||||
val file = FileDocumentManager.getInstance().getFile(document)?.takeIf { it.isInLocalFileSystem } ?: return
|
val file = FileDocumentManager.getInstance().getFile(document)?.takeIf { it.isInLocalFileSystem } ?: return
|
||||||
|
|
||||||
|
// Do not listen for changes in files that are not open
|
||||||
|
if (file !in FileEditorManager.getInstance(project).openFiles) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (ApplicationManager.getApplication().isUnitTestMode) {
|
if (ApplicationManager.getApplication().isUnitTestMode) {
|
||||||
getListener(project, file)?.documentChanged(file, updater)
|
getListener(project, file)?.documentChanged(file, updater)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user