[bug]: Cursor misalignment occurs when displaying inline code in Markdown under word wrap

Open
#948 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
58/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
cli

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.

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

Dominant language
Rust
Stars
14.6k
Forks
735
Avg merge
8h 40m
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/edit

All issues in microsoft/edit

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.