Refactoring Result grid copy to fix issues. #20870
Open
+99
−86
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Template – vscode-mssql
Description
Clipboard reliability in SSH/remote scenarios
This PR updates the copy workflow to ensure reliable behavior in remote SSH environments. Previously, the copy string was generated in STS, which also attempted to write it to the clipboard — a process that was often unreliable. Now, STS returns the copy string to the extension, and the clipboard write happens locally.
Fixes Copy to clipboard from Results not working #20747
Reduce unnecessary progress notifications
Progress notifications are no longer shown for copy operations that fall below the in-memory row threshold. These operations complete almost instantly, and the brief notification created unnecessary UI noise.
New-line setting now respected
This change also resolves an issue where the configured new-line setting was not being applied.
Fixes [Bug]: New Line does not copy from results #20752 (implementation in STS PR Fixing copy new line settings variable in extension. sqltoolsservice#2557).
More reliable sorted/filtered row detection
The PR also switches to a better way for detecting sorted or filtered rows in the query grid, addressing scenarios where the previous approach failed intermittently.
Code Changes Checklist
npm run test)Reviewers: Please read our reviewer guidelines