Favor selected text over the whole ace editor text in "runExplain" and "Export" functionalities
This commit is contained in:
@@ -563,7 +563,7 @@ function runExplain() {
|
||||
$("#run, #explain, #csv, #json, #xml").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, #json, #xml").prop("disabled", false);
|
||||
@@ -583,7 +583,7 @@ function runExplain() {
|
||||
}
|
||||
|
||||
function exportTo(format) {
|
||||
var query = $.trim(editor.getValue());
|
||||
var query = $.trim(editor.getSelectedText() || editor.getValue());
|
||||
|
||||
if (query.length == 0) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user