fix(layout): align diff1_inline diff computation with side-by-side layouts#126
fix(layout): align diff1_inline diff computation with side-by-side layouts#126dlyongemallo merged 1 commit intomainfrom
diff1_inline diff computation with side-by-side layouts#126Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the diff1_inline layout’s inline diff computation to better match the behavior of side-by-side layouts by forwarding relevant whitespace/case 'diffopt' flags to vim.diff, while intentionally excluding linematch due to incompatibility with the inline renderer’s positional hunk model. It also documents the linematch limitation for diff1_inline.
Changes:
- Parse and forward whitespace/case-related
'diffopt'flags (e.g.iwhite,icase) tovim.difffor inline rendering. - Stop forwarding
linematchto avoid mis-anchored deletions in the inline renderer. - Update user docs to clarify
linematchsupport differences across layouts and document which flagsdiff1_inlinehonors.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| lua/diffview/scene/layouts/diff_1_inline.lua | Parses effective 'diffopt' and forwards whitespace/case flags while explicitly excluding linematch. |
| lua/diffview/scene/inline_diff.lua | Extends InlineDiffOpts and forwards additional vim.diff ignore flags. |
| doc/diffview.txt | Documents that linematch is not used by diff1_inline and clarifies which flags are honored. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
df3b3f1 to
02dbfd7
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
02dbfd7 to
5ebd7a5
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…layouts Forward the whitespace flags (`iwhite`, `iwhiteall`, `iwhiteeol`, `iblank`) to `vim.diff` and drop `linematch`, which mis-anchors deletions in the inline renderer by pairing lines by similarity rather than position.
5ebd7a5 to
087e4f5
Compare
Forward the whitespace flags (
iwhite,iwhiteall,iwhiteeol,iblank) tovim.diffand droplinematch, which mis-anchors deletions in the inline renderer by pairing lines by similarity rather than position.