Azuredatastudio: Preserve line endings in results grid when copying

Created on 6 May 2020  路  2Comments  路  Source: microsoft/azuredatastudio

Is your feature request related to a problem? Please describe.
When copying from a results grid cell that contains line endings, the pasted result does not preserve the line endings.
Describe the solution or feature you'd like
I'd like a option to preserve line endings from the results grid or not when copying similar to SSMS.

  1. Execute this query in Azure Data Studio
    SELECT 'line 1' + CHAR(13) + CHAR(10) + 'line 2' + CHAR(13) + CHAR(10) + 'line 3'
  2. Copy from the results grid
  3. Observe when pasting back into a text area the line feed and carraige returns have disappeared
    image

Behaviour I'd like to see
image

Describe alternatives you've considered
I had to revert back to SQL Server Management Studio when I know I'll be dealing with queries with output containing line endings
Additional context
SSMS setting for context
image

Area - Query Editor Enhancement Needed

Most helpful comment

This setting exists as Sql: Copy Remove New Line

image

When unchecked it will preserve CR/LF from copied results.

All 2 comments

This setting exists as Sql: Copy Remove New Line

image

When unchecked it will preserve CR/LF from copied results.

@Charles-Gagnon Thank for pointing that out, in my settings that was ticked. My google-fu missed this!

Was this page helpful?
0 / 5 - 0 ratings