Repository navigation
Use add/delete line highlights and highlight full line width - #15
Merged
Merged
Conversation
- Pure insertions (empty original range) now use PartialDiffLineAdd on the To side and pure deletions use PartialDiffLineDelete on the From side; only modified blocks use PartialDiffLineChange. line_add/line_delete were configurable but never used. - Line highlights use line_hl_group instead of a 0..#line column range, so empty added/deleted lines are visible and the highlight spans the window width like diff mode. - When the vscode-diff call fails inside apply_diff_highlights, apply diff.fallback_diffopt like the regular fallback path does. Closes #13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #13.
Summary
PartialDiffLineAddon the To side, and pure deletions (empty modified range) getPartialDiffLineDeleteon the From side. Only modified blocks usePartialDiffLineChange. Theline_add/line_deleteoptions were configurable but never used.line_hl_groupinstead of an extmark spanning column 0..#line. Empty added/deleted lines are now visible, and the highlight extends to the window edge like diff mode. Move highlights use the same helper, so they're full width too.apply_diff_highlights,diff.fallback_diffoptis applied (and restored on close), same as the regular fallback path.Testing
make test: 41/41 pass locally (Neovim 0.11.1).line_hl_group, fallback diffopt on vscode-diff failure.line_hl_group, so the existing move/line assertions keep checking the same thing.