From 2844af3a0468fbef1d6322474119b5bc92a97243 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 23 Jan 2024 17:06:16 -0400 Subject: st4: hsmusic: fix error spam when not in a project --- apps/Sublime Text 4/Packages/User/HSMusic Editing.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apps/Sublime Text 4') diff --git a/apps/Sublime Text 4/Packages/User/HSMusic Editing.py b/apps/Sublime Text 4/Packages/User/HSMusic Editing.py index 63e3dc3..bde61b0 100644 --- a/apps/Sublime Text 4/Packages/User/HSMusic Editing.py +++ b/apps/Sublime Text 4/Packages/User/HSMusic Editing.py @@ -6,6 +6,10 @@ import os class ProjectSpecificKeyBinding(sublime_plugin.EventListener): def on_query_context(self, view, key, operator, operand, match_all): current_project_name = view.window().project_file_name() + + if not current_project_name: + return None + if key != "project_name" and os.path.isfile(current_project_name): return None -- cgit 1.3.0-6-gf8a5