Skip to content

Commit

Permalink
reveal language snippets on active text editor change only when snipp…
Browse files Browse the repository at this point in the history
…ets tree view is visible (#10)
  • Loading branch information
RandomFractals committed Mar 30, 2021
1 parent a32e3f3 commit cf21b27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function activate(context: ExtensionContext) {

// check for active editor changes
window.onDidChangeActiveTextEditor((textEditor: TextEditor | undefined) => {
if (textEditor) {
if (textEditor && snippetView.visible) {
const editorLanguage: string = textEditor.document.languageId;
const snippetsLanguage: SnippetLanguage | undefined = snippetLoader.snippetLanguages.get(editorLanguage);
if (snippetsLanguage) {
Expand Down

0 comments on commit cf21b27

Please sign in to comment.