enhance: unify selection mode and hunk mode

This commit is contained in:
leo 2024-07-18 16:16:58 +08:00
parent 42f8e41985
commit 9de2853003
No known key found for this signature in database
7 changed files with 446 additions and 724 deletions

View file

@ -26,7 +26,7 @@
UseSyntaxHighlighting="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSyntaxHighlighting}"
WordWrap="{Binding Source={x:Static vm:Preference.Instance}, Path=EnableDiffViewWordWrap}"
ShowHiddenSymbols="{Binding Source={x:Static vm:Preference.Instance}, Path=ShowHiddenSymbolsInDiffView}"
HighlightChunk="{Binding #ThisControl.HighlightChunk, Mode=TwoWay}"/>
SelectedChunk="{Binding #ThisControl.SelectedChunk, Mode=TwoWay}"/>
</DataTemplate>
<DataTemplate DataType="vm:TwoSideTextDiff">
@ -46,7 +46,7 @@
UseSyntaxHighlighting="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSyntaxHighlighting}"
WordWrap="{Binding Source={x:Static vm:Preference.Instance}, Path=EnableDiffViewWordWrap}"
ShowHiddenSymbols="{Binding Source={x:Static vm:Preference.Instance}, Path=ShowHiddenSymbolsInDiffView}"
HighlightChunk="{Binding #ThisControl.HighlightChunk, Mode=TwoWay}"/>
SelectedChunk="{Binding #ThisControl.SelectedChunk, Mode=TwoWay}"/>
<Rectangle Grid.Column="1" Fill="{DynamicResource Brush.Border2}" Width="1" HorizontalAlignment="Center" VerticalAlignment="Stretch"/>
@ -65,7 +65,7 @@
UseSyntaxHighlighting="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSyntaxHighlighting}"
WordWrap="{Binding Source={x:Static vm:Preference.Instance}, Path=EnableDiffViewWordWrap}"
ShowHiddenSymbols="{Binding Source={x:Static vm:Preference.Instance}, Path=ShowHiddenSymbolsInDiffView}"
HighlightChunk="{Binding #ThisControl.HighlightChunk, Mode=TwoWay}"/>
SelectedChunk="{Binding #ThisControl.SelectedChunk, Mode=TwoWay}"/>
</Grid>
</DataTemplate>
</ContentControl.DataTemplates>