Skip to content

Conversation

@wolfgang42
Copy link
Contributor

@wolfgang42 wolfgang42 commented Apr 18, 2025

Previously, this snippet just inserted > before the selected text, which is not very useful; particularly, when multiple paragraphs are selected, this will only quote the first one:

> This is a paragraph.

This is another paragraph, which was supposed to be quoted but wasn't.

Instead, we now prefix every line in the selection with > , so that it will all be quoted regardless of how many paragraphs are taken.

> This is a paragraph.
> 
> This is another paragraph, which was supposed to be quoted and now is.

This does also change the behavior in the case of no selected text slightly; previously it would insert > [] (where [] indicates the selection; that is, it would put the insertion point after the quote marker). It now inserts [> ] instead (that is, the same text but it's all selected) so if you start typing you'll wind up removing the quote marker. Since using this snippet without a selection is just a roundabout way of typing >  this seems like an acceptable tradeoff.

Closes #247150.

Previously, this snippet just inserted "> " before the selected text, which is
not very useful; particularly, when multiple paragraphs are selected, this will
only quote the first one.

Instead, we now prefix every line in the selection with "> ", so that it will
all be quoted regardless of how many paragraphs are taken.

This does also change the behavior in the case of no selected text slightly;
previously it would insert "> []" (where "[]" indicates the selection; that is,
it would put the insertion point after the quote marker). It now inserts
"[> ]" instead (that is, the same text but it's all selected) so if you start
typing you'll wind up removing the quote marker. Since using this snippet *not*
on a selection seems like a roundabout way of writing "> " this seems like an
acceptable tradeoff.
@RedCMD
Copy link
Contributor

RedCMD commented Apr 18, 2025

should link a bug report with a screenshot of the old broken behaviour
shift+win+S on windows

@wolfgang42
Copy link
Contributor Author

@RedCMD wrote:

should link a bug report with a screenshot of the old broken behaviour

Filed #247150, though I feel like I must be missing something? It seems redundant to copy the PR description backwards into an issue description.

Copy link
Collaborator

@mjbvz mjbvz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mjbvz mjbvz enabled auto-merge April 22, 2025 18:09
@vs-code-engineering vs-code-engineering bot added this to the April 2025 milestone Apr 22, 2025
@mjbvz mjbvz merged commit 2073d9a into microsoft:main Apr 22, 2025
7 checks passed
@RedCMD
Copy link
Contributor

RedCMD commented Apr 22, 2025

@wolfgang42 the devs are auto assigned to issues
but not PR's

@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Jun 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

4 participants