feature: diff - toggle show all lines (#615) #652
Merged
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.
This addresses the issue (suggestion) #615 - Implemented new TextDiff feature "Show All Lines" (toggle)
Summary of changes:
Increase/Decrease Number of Visible Lines
when toggled ON.Icons.Lines.All
with SVG path fromtext_line_spacing_regular
at https://avaloniaui.github.io/icons.html.Text.Diff.VisualLines.All
for en_US locale (no translations added yet).UseFullTextDiff
to store this toggle setting.UseFullTextDiffProperty
in TextDiffView, with a DataTemplate binding to the corresponding preference property.unified
(number of context lines) param for Commands.Diff() with a very high number (done in DiffContext.LoadDiffContent()).TextDiff.SyncScrollOffset
toTextDiff.ScrollOffset
, to distinguish it from the identically named propertyTwoSideTextDiff.SyncScrollOffset
. These two properties are distinct from each other and are used in separate (though slightly related) ways - they are not really connected, which initially confused me when reading the code. The one inTwoSideTextDiff
is mainly used to keep the scroll-pos of the twoSingleSideTextDiffPresenter
views in sync (aligned), while the one inTextDiff
is used only to preserve/reset the scroll-pos in the singleCombinedTextDiffPresenter
view when (re)loading Diff Content (so not really syncing anything).