fix(query): preserve selected statement source range
This commit is contained in:
1 parent
6bd49fcd19
commit
8cebc4a366
10 files changed
+127
-32
No files matched your search
@@ -1109,10 +1109,13 @@ function executableSqlFromView(currentView: EditorViewType): string {
|
||||
}
|
||||
|
||||
function sqlExecutionSnapshotFromView(currentView: EditorViewType): SqlExecutionSnapshot {
|
||||
const selection = currentView.state.selection.main;
|
||||
return {
|
||||
fullSql: currentView.state.doc.toString(),
|
||||
selectedSql: selectedSqlFromView(currentView),
|
||||
cursorPos: currentView.state.selection.main.head,
|
||||
cursorPos: selection.head,
|
||||
selectionFrom: selection.from,
|
||||
selectionTo: selection.to,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user