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 385b415
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion static/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ function runQuery() {
$("#run, #explain, #csv").prop("disabled", true);
$("#query_progress").show();

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

if (query.length == 0) {
$("#run, #explain, #csv").prop("disabled", false);
Expand Down

0 comments on commit 385b415

Please sign in to comment.