mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-08-17 16:34:44 -05:00
getSelectionFromState() joined ranges with the chosen EOL but sliced each range via state.sliceDoc(), which always uses the document's own \n regardless of the LF/CRLF preference. Introduced in #8691 when the copy path switched from doc.sliceString(..., lineSep) to sliceDoc(...) to fix multi-cursor copying. Slice with state.doc.sliceString(range.from, range.to, lineSep) so the chosen EOL applies within a range too; the #8691 multi-cursor join behavior is unchanged. Fixes #10158