microsoft / microsoft/vscode

Agents window Markdown editor: Select All does not replace a pending paragraph

Open
#327,532 0 comments 0 reactions 1 assignee Claimed by @ulugbekna View on GitHub
bug markdown-editor
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

Testing #326540

Does this issue occur when all extensions are disabled?: Yes

- VS Code Version: Insiders with the experimental Markdown editor
- OS Version: macOS
- Audited package revision: microsoft/vscode-packages@1d81418d61ad769f154579196a51a9364c105e2d

### Steps to Reproduce

1. Open a Markdown document containing `Hello`.
2. Put the caret after `Hello`.
3. Press Enter. A new empty paragraph appears.
4. Press Cmd+A.
5. Type `X`.

### Expected

The selected document is replaced with:

```text
X
```

### Actual

The selection appears to cover the document, but typing materializes the pending paragraph instead:

```text
Hello

X
```

### Impact

The visible selection and the edit target disagree. A user performing a destructive replacement can unexpectedly preserve old content and insert somewhere else, which undermines selection fidelity and can produce incorrect documents without an obvious explanation.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.