Skip to content

Commit

Permalink
Run selected text. Implements sosedoff#78.
Browse files Browse the repository at this point in the history
In the Query tab, only run the selected text. If nothing selected, run all text in the editor.
  • Loading branch information
brianlow committed May 18, 2015
1 parent 50f0f5f commit e2337e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions static/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ function runQuery() {
$("#run, #explain, #csv").prop("disabled", true);
$("#query_progress").show();

var query = $.trim(editor.getValue());

var query = query = $.trim(editor.getSelectedText() || editor.getValue());
if (query.length == 0) {
$("#run, #explain, #csv").prop("disabled", false);
$("#query_progress").hide();
Expand Down

0 comments on commit e2337e9

Please sign in to comment.