mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
refactor: Upgrade to React 17 (#31961)
This commit is contained in:
committed by
GitHub
parent
aa74ba3da2
commit
7e2b7941f3
@@ -485,20 +485,28 @@ const SqlEditor: FC<Props> = ({
|
||||
const cursorPosition = editor.getCursorPosition();
|
||||
const totalLine = session.getLength();
|
||||
const currentRow = editor.getFirstVisibleRow();
|
||||
let end = editor.find(';', {
|
||||
const semicolonEnd = editor.find(';', {
|
||||
backwards: false,
|
||||
skipCurrent: true,
|
||||
})?.end;
|
||||
});
|
||||
let end;
|
||||
if (semicolonEnd) {
|
||||
({ end } = semicolonEnd);
|
||||
}
|
||||
if (!end || end.row < cursorPosition.row) {
|
||||
end = {
|
||||
row: totalLine + 1,
|
||||
column: 0,
|
||||
};
|
||||
}
|
||||
let start = editor.find(';', {
|
||||
const semicolonStart = editor.find(';', {
|
||||
backwards: true,
|
||||
skipCurrent: true,
|
||||
})?.end;
|
||||
});
|
||||
let start;
|
||||
if (semicolonStart) {
|
||||
start = semicolonStart.end;
|
||||
}
|
||||
let currentLine = start?.row;
|
||||
if (
|
||||
!currentLine ||
|
||||
|
||||
Reference in New Issue
Block a user