Allow running non-continuous selected SQL code blocks in the query tool. #7293

This commit is contained in:
Aditya Toshniwal 2024-08-29 12:41:58 +05:30
parent a0f7d0d50f
commit 1a1734cf5c
2 changed files with 3 additions and 2 deletions

View File

@ -20,6 +20,7 @@ Bundled PostgreSQL Utilities
New features
************
| `Issue #7293 <https://github.com/pgadmin-org/pgadmin4/issues/7293>`_ - Allow running non-continuous selected SQL code blocks in the query tool.
Housekeeping
************
@ -28,4 +29,4 @@ Housekeeping
Bug fixes
*********
| `Issue #7076 <https://github.com/pgadmin-org/pgadmin4/issues/7076>`_ - Revamp the current password saving implementation to a keyring and reduce repeated OS user password prompts.
| `Issue #7076 <https://github.com/pgadmin-org/pgadmin4/issues/7076>`_ - Revamp the current password saving implementation to a keyring and reduce repeated OS user password prompts.

View File

@ -197,7 +197,7 @@ export default class CustomEditorView extends EditorView {
}
getSelection() {
return this.state.sliceDoc(this.state.selection.main.from, this.state.selection.main.to) ?? '';
return this.state.selection.ranges.map((range)=>this.state.sliceDoc(range.from, range.to)).join('') ?? '';
}
replaceSelection(newValue) {