diff --git a/static/js/app.js b/static/js/app.js index a104d93..51b8c49 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -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);