[editor] Properly scroll to the executing query when selected queries are executed
if (item.line !== null) {
if (type === 'error') {
editor.addError(item.message, item.line + offset);
- }
- else {
+ } else {
editor.addWarning(item.message, item.line + offset);
}
if (cnt == 0) {
background-color: #E3F7FF;\
position: absolute;\
}');
- editor.scrollToLine(range.start.row, true, true, function () {});
+ var selectionRange = editor.getSelectionRange();
+ editor.scrollToLine(Math.min(selectionRange.start.row, selectionRange.end.row) + range.start.row, true, true, function () {});
}
}
try {
