fix(sqllab): scroll position after run current sql (#24965)

This commit is contained in:
JUST.in DO IT 2023-08-15 10:52:35 -07:00 committed by GitHub
parent 025e4d4772
commit 155cf54c15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -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);
},
},
{