From 672da7d471176129c465b9f69b9cf661e9486299 Mon Sep 17 00:00:00 2001 From: Ivan Senji Date: Mon, 4 Mar 2019 10:35:16 +0100 Subject: [PATCH] Fill quick panel with tables with a selection from the active view. --- SQLTools.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SQLTools.py b/SQLTools.py index 18a4780..6e39295 100644 --- a/SQLTools.py +++ b/SQLTools.py @@ -412,7 +412,12 @@ def selectTable(callback): sublime.message_dialog('Your database has no tables.') return - Window().show_quick_panel(ST.tables, callback) + w = Window(); + view = w.active_view() + text = view.substr(view.sel()[0]) + w.show_quick_panel(ST.tables, callback) + w.run_command('insert', {'characters': text}) + w.run_command("select_all") @staticmethod def selectFunction(callback):