[bug]: Cursor misalignment occurs when displaying inline code in Markdown under word wrap
- Dominant language
- Rust
- Stars
- 14.6k
- Forks
- 734
- Avg merge
- 8h 40m
- Merged PRs (30d)
- 4
Description
When the language mode is set to Markdown, with word wrap enabled and inline code used, the software displays misalignment as shown in the video. The misalignment disappears when a space is entered. For Chinese input, the misalignment also disappears after the candidate text is committed via the IME. This issue does not occur when word wrap is disabled.
https://github.com/user-attachments/assets/c936b175-bafa-4ed0-8e31-85e8a64ee399
This phenomenon only happens when the inline code is on the last line of the current document.
Edit version: 2.0.0
Terminal version: 1.24.11911.0
Contributor guide
Research direction
Start by reproducing the issue in the terminal editor with Markdown, word wrap enabled, and inline code on the document's last line; compare behavior with word wrap disabled and after entering a space or committing Chinese IME text. Trace the terminal rendering and wrapping path, then verify that cursor alignment remains correct in all described cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100