diff --git a/superset-frontend/src/SqlLab/components/SqlEditor/index.jsx b/superset-frontend/src/SqlLab/components/SqlEditor/index.jsx index 69f9f36ee3..cda252f1e3 100644 --- a/superset-frontend/src/SqlLab/components/SqlEditor/index.jsx +++ b/superset-frontend/src/SqlLab/components/SqlEditor/index.jsx @@ -343,6 +343,7 @@ const SqlEditor = ({ const session = editor.getSession(); const cursorPosition = editor.getCursorPosition(); const totalLine = session.getLength(); + const currentRow = editor.getFirstVisibleRow(); let end = editor.find(';', { backwards: false, skipCurrent: true, @@ -390,6 +391,7 @@ const SqlEditor = ({ startQuery(); editor.selection.clearSelection(); editor.moveCursorToPosition(cursorPosition); + editor.scrollToRow(currentRow); }, }, {