From 1c79b965c694ac679377227ff12f53caa002a6c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20D=C3=ADaz=20Bustamante?= Date: Thu, 25 Jan 2018 13:35:28 +0100 Subject: [PATCH] Add setting focus_on_result --- SQLTools.py | 3 ++- SQLTools.sublime-settings | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/SQLTools.py b/SQLTools.py index 60e5114..a59e4c8 100644 --- a/SQLTools.py +++ b/SQLTools.py @@ -217,7 +217,8 @@ def onInitialOutputCallback(): # if case this is an output pannel, show it Window().run_command("show_panel", {"panel": "output." + name}) - Window().focus_view(resultContainer) + if settings.get('focus_on_result', False): + Window().focus_view(resultContainer) return resultContainer, onInitialOutputCallback diff --git a/SQLTools.sublime-settings b/SQLTools.sublime-settings index 1410008..4ab40e7 100644 --- a/SQLTools.sublime-settings +++ b/SQLTools.sublime-settings @@ -28,6 +28,9 @@ // puts results either in output panel or new window "show_result_on_window": false, + // focus on result panel + "focus_on_result": false, + // clears the output of previous query "clear_output": true,