Skip to content
This repository was archived by the owner on Mar 12, 2020. It is now read-only.

Commit 672da7d

Browse files
committed
Fill quick panel with tables with a selection from the active view.
1 parent 9ba95d3 commit 672da7d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

SQLTools.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,12 @@ def selectTable(callback):
412412
sublime.message_dialog('Your database has no tables.')
413413
return
414414

415-
Window().show_quick_panel(ST.tables, callback)
415+
w = Window();
416+
view = w.active_view()
417+
text = view.substr(view.sel()[0])
418+
w.show_quick_panel(ST.tables, callback)
419+
w.run_command('insert', {'characters': text})
420+
w.run_command("select_all")
416421

417422
@staticmethod
418423
def selectFunction(callback):

0 commit comments

Comments
 (0)