From d4a7d92e3e238493f9629ba1cc1cf421081e8883 Mon Sep 17 00:00:00 2001 From: Julien Delange Date: Mon, 12 Sep 2022 22:54:29 -0600 Subject: [PATCH] fix issue with update snippet --- gradle.properties | 2 +- .../jetbrains/actions/snippet_search/SnippetToolWindow.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 89893f8..d5462ba 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ pluginGroup=codiga.io.plugins pluginName=codiga-jetbrains-plugin -pluginVersion=1.7.10 +pluginVersion=1.7.11 pluginSinceBuild=213 pluginUntilBuild=222.* # Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl diff --git a/src/main/java/io/codiga/plugins/jetbrains/actions/snippet_search/SnippetToolWindow.java b/src/main/java/io/codiga/plugins/jetbrains/actions/snippet_search/SnippetToolWindow.java index 6afc32e..05abb0f 100644 --- a/src/main/java/io/codiga/plugins/jetbrains/actions/snippet_search/SnippetToolWindow.java +++ b/src/main/java/io/codiga/plugins/jetbrains/actions/snippet_search/SnippetToolWindow.java @@ -97,7 +97,7 @@ private void updateResult() { FileEditorManager fileEditorManager = FileEditorManager.getInstance(project); - if (fileEditorManager == null) { + if (fileEditorManager == null || fileEditorManager.getSelectedEditor() == null) { LOGGER.info("cannot find editor manager"); return; }