From fd63d7b75e67b936a16ce3b99789f8cd3394fec2 Mon Sep 17 00:00:00 2001 From: Olav Kokovkin Date: Fri, 4 May 2018 13:18:36 +0300 Subject: [PATCH] Check sidebar command visibility --- Log Highlight.py | 4 ++++ Log Highlight.sublime-settings | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Log Highlight.py b/Log Highlight.py index af45407..c59eb94 100644 --- a/Log Highlight.py +++ b/Log Highlight.py @@ -1068,6 +1068,10 @@ def run(self, edit): class LogHighlightSetAsBaseCommand(sublime_plugin.TextCommand): + def is_visible(self): + srch_opt = get_prefs().get('search_base', []) + return srch_opt.get('sidebar_enable', True) + def run(self, edit, **args): try: path = args.get('paths', [])[0] diff --git a/Log Highlight.sublime-settings b/Log Highlight.sublime-settings index 77a6c84..7033a66 100644 --- a/Log Highlight.sublime-settings +++ b/Log Highlight.sublime-settings @@ -27,7 +27,8 @@ // hidden folders are ignored as default, like .git, .svn "ignore_dir" : [""], // adjust when using network like samba - "max_scan_path" : 1000 + "max_scan_path" : 1000, + "sidebar_enable": true }, // summary panel