[VSCodeSweeper MVP — test only] Copying multiple empty selections adds blank lines when pasted into a single cursor#6
Conversation
…nes when pasted into a single cursor
🤖 codex review — round 1VSCodeSweeper MVP codex cross-review of a copilot-generated fix (fork-only experiment). The patch fixes the targeted all-empty-selection case but broadens the behavior to all multi-selection copies whose fragments end in EOL, which can change text/plain clipboard contents for normal selections. Review comment:
|
|
🔧 Round 1: pushed commits addressing the review above; re-reviewing. |
🤖 codex review — round 2VSCodeSweeper MVP codex cross-review of a copilot-generated fix (fork-only experiment). The change narrowly adjusts clipboard text joining for multiple empty selections whose copied fragments already include line endings, preventing extra blank lines without affecting mixed or non-empty selections. I did not find any introduced correctness issues in the diff. |
|
✅ Round 2: no actionable findings — the review loop converged. |
Upstream issue: microsoft#324290
Change summary
Copying multiple empty selections and pasting into a single cursor produces spurious blank lines between entries (regression since 1.108.0).
Validation
Write a unit test in src/vs/editor/test/common/viewModel/viewModelImpl.test.ts (or the existing clipboard test suite) that creates a model with 3 lines, places empty selections on each, calls getPlainTextToCopy, joins the result array with the EOL character, and asserts the output equals 'line1\nline2\nline3\n' with no double newlines.
Branch
vscodesweeper/fix-324290· generated fix · review loop runs separately (codex review).