Fix unexpected loading for script configurations during branch switch

This commit is contained in:
Natalia Selezneva
2020-04-03 19:37:44 +03:00
parent 936801d744
commit a07f455ae5
@@ -62,6 +62,11 @@ internal class ScriptChangesNotifier(
val document = event.document
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) {
getListener(project, file)?.documentChanged(file, updater)
} else {