Skip to content

Commit

Permalink
Fill quick panel with tables with a selection from the active view.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivans committed Mar 4, 2019
1 parent 9ba95d3 commit 672da7d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion SQLTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 672da7d

Please sign in to comment.