refactor: Upgrade to React 17 (#31961)

This commit is contained in:
Kamil Gabryjelski
2025-01-28 16:44:42 +01:00
committed by GitHub
parent aa74ba3da2
commit 7e2b7941f3
101 changed files with 18988 additions and 61350 deletions

View File

@@ -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 ||