microsoft / microsoft/monaco-editor

[Bug] Left side of diff editor doesn't wrap content after updating `diffWordWrap` option.

Open
#4,701 3 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
46.8k
Forks
4.1k
Avg merge
17h 58m
Merged PRs (30d)
1

Description

Reproducible in vscode.dev or in VS Code Desktop?
  • Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
Monaco Editor Playground Link

https://microsoft.github.io/monaco-editor/playground.html?source=v0.52.0#XQAAAAJrCQAAAAAAAABBqQkHQ5NjdWjG3nJH6nYgNTFIs0eslW5KRDdbYOWGbc1EX2GNlNTJgp2m46QlGPhpJKGEa0GGJxxCKjsbIxV9lPTvjgiOlC-flw7srY_Mti7JJLN0jbjEAm4C_zbsqtdHzwLdgfYBplzpK6veo-gWVAqVnYTF5aX2dTDltSh9WDGYcA6Oed56HDMXezV7Do5jhIO-46tzhBRmPlXtGRqiUET3vyx5AcnOy0sOeMMeQSYGE9q_6nbjMIfjZHcq0kDhCZb3IloPjPL3dBYYscQAU23gI12zDkI2znzUIPuAfudeXLwfPEGbvhBDbhrLrBX0JXcK5iYDqTO3aed-aUEFl1mr04eh4ZHZsEh6KAABKaaNiE6Ntg4p-AiXaXrhhbW6GuwULzakiI1VNpEcgonenO5mM9JOXFv0Q0Rh9zfT2AVdMJEb4a-Cnb1LRr-pnJ9FoldJtUC8LUW5-ZNgJ8yhreo3XUL0Icc7oEWGU5pnT3JIqKuPtxj4OzlRKXkSm9ivLTgLknpnLgBFErV45pfMhlz-Ooise_PKOlYRpLxmp_WTbHRNjPVS75Bv70svc2Lt9V5l5A93_WVDORBM3POM8nDBRregyqKBtMT5OvB-Fm77GIMFikK_W1NZEZ9Wpo6XlyXRB6WfSCb5B9DiFwGF1w3Ej85NQ7QhqjLo90eBGUpN0AEY8XCv1aPReh11bffX9gNYfbyO3kbeWNlWTcfWsG6BVq9DaaWFNhR-F1zyC6tQ5RyN9iLg20k4dugF0xKHdjW73bDotm5ADvUYBHks7dcnNKvXhCYI4ZfmXDKEI_gur27229vBcRw-qPE0udswtaN7LRszc5oXKEooomUWcSgOoYhmpcgLJlJDdYvwD87hqIo3ytID_LAaV9Q3HUx_QNlWcaj4clnp0QnWq1ZzXhMrenbbpP3drRZxFEaUca5vJgNJ-Hj5HxMPeSlTcLaShghr_AUEQlLbZYEk3_NhGU_7W9oTla2eY-PNPbV7u8o83xSqoQpdsUwFYtvNbvW7fQGPy2OtrAKSC24wmK73WqBU90Qg8lyq9LK3dPEhvz2CIzL7u_43g-4Q4QZqVu81ZLog8fRTXrKazkIajGtIG-BhL4KST3qsUPFZ-SWWXqFXZq5EBaGNQuKW8ie8gJ47la8CoquMHhOp4qnRGKwShI87yzz_8mVpPQ

Monaco Editor Playground Code

No response

Reproduction Steps
  1. See how the content is properly wrapped in both sides of the diff editor
  2. Click on 'toggle split' and click again for the content to show side by side.
  3. See how the content at the left side of the diff editor is not wrapped anymore.
Actual (Problematic) Behavior

When updating the renderSideBySide (from true to false, then true again), the wrap is not done correctly on the left side of the diff editor.

image

Expected Behavior

diffWordWrap property should consistently wrap the content in both sides of the diff editor when switching options.

Additional Context

No response

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.

Research direction

Start with the linked Monaco Editor Playground reproduction and inspect the diff editor behavior around the diffWordWrap and renderSideBySide options. Reproduce the toggle-split sequence, then verify that wrapping remains consistent on both sides after switching renderSideBySide off and on.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.