feat: add word wrapping setting and in-panel button#1326
feat: add word wrapping setting and in-panel button#1326juliusmarminge merged 1 commit intopingdotgg:mainfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
I will leave this PR here, if this is something that would be useful I am glad to follow up, otherwise this can also be closed; I added this to my fork and saw it enhanced my workflow and I thought this could be a meaningful addition. Love your work here, thanks for creating this 😊 |
2c6a168 to
7bfd460
Compare
Complementary to #1250, this PR also introduces a settings option and decouples the setting from the in-panel toggle logic.
What Changed
Added a word wrapping setting and in-diff-panel button.
The in-diff-panel button is decoupled and resets to the settings default on re-opening the diff view, I found this better when testing the change since I sometimes would like to see the unwrapped state without it changing my global settings.
Why
When working on docs and other text files the sideways scrolling breaks reading flow.
UI Changes
Before (no button for warpping):

After

With settings flow:
https://cleanshot.com/share/78GQRsvg
Checklist
Note
Low Risk
Low risk: adds a new boolean setting and UI toggles affecting only diff rendering/overflow behavior, with no security- or data-critical logic changes.
Overview
Adds a new
diffWordWrapapp setting (defaultfalse) and exposes it in Settings as “Diff line wrapping” with reset-to-default support.Updates
DiffPanelto include an in-panel wrap toggle and to apply wrap vs horizontal scroll to both parsed diffs (FileDiffoverflow) and raw patch rendering; the toggle is session-scoped and re-initializes from the saved setting each time the diff panel is opened.Written by Cursor Bugbot for commit 7bfd460. This will update automatically on new commits. Configure here.
Note
Add word wrap toggle to the diff panel and settings
diffWordWrapboolean to appSettings.ts, defaulting tofalse, which sets the initial wrap state each time the diff panel opens.overflow: 'wrap'or'scroll'toFileDiffaccordingly.Macroscope summarized 7bfd460.