@@ -1464,7 +1464,7 @@ protected override void OnPointerExited(PointerEventArgs e)
14641464
14651465 private async void OnStageChunk ( object _1 , RoutedEventArgs _2 )
14661466 {
1467- if ( DataContext is not ViewModels . TextDiffContext { SelectedChunk : { } chunk , Data : { } diff , Option : { IsUnstaged : true , WorkingCopyChange : { } change } } )
1467+ if ( DataContext is not ViewModels . TextDiffContext { SelectedChunk : { } chunk , Data : { } diff , Option : { IsUnstaged : true , WorkingCopyChange : { } change } } vm )
14681468 return ;
14691469
14701470 var selection = diff . MakeSelection ( chunk . StartIdx + 1 , chunk . EndIdx + 1 , chunk . Combined , chunk . IsOldSide ) ;
@@ -1496,12 +1496,13 @@ private async void OnStageChunk(object _1, RoutedEventArgs _2)
14961496 await new Commands . Apply ( repo . FullPath , tmpFile , true , "nowarn" , "--cache --index" ) . ExecAsync ( ) ;
14971497 File . Delete ( tmpFile ) ;
14981498
1499+ vm . BlockNavigation . UpdateByChunk ( chunk ) ;
14991500 repo . MarkWorkingCopyDirtyManually ( ) ;
15001501 }
15011502
15021503 private async void OnUnstageChunk ( object _1 , RoutedEventArgs _2 )
15031504 {
1504- if ( DataContext is not ViewModels . TextDiffContext { SelectedChunk : { } chunk , Data : { } diff , Option : { IsUnstaged : false , WorkingCopyChange : { } change } } )
1505+ if ( DataContext is not ViewModels . TextDiffContext { SelectedChunk : { } chunk , Data : { } diff , Option : { IsUnstaged : false , WorkingCopyChange : { } change } } vm )
15051506 return ;
15061507
15071508 var selection = diff . MakeSelection ( chunk . StartIdx + 1 , chunk . EndIdx + 1 , chunk . Combined , chunk . IsOldSide ) ;
@@ -1526,12 +1527,13 @@ private async void OnUnstageChunk(object _1, RoutedEventArgs _2)
15261527 await new Commands . Apply ( repo . FullPath , tmpFile , true , "nowarn" , "--cache --index --reverse" ) . ExecAsync ( ) ;
15271528 File . Delete ( tmpFile ) ;
15281529
1530+ vm . BlockNavigation . UpdateByChunk ( chunk ) ;
15291531 repo . MarkWorkingCopyDirtyManually ( ) ;
15301532 }
15311533
15321534 private async void OnDiscardChunk ( object _1 , RoutedEventArgs _2 )
15331535 {
1534- if ( DataContext is not ViewModels . TextDiffContext { SelectedChunk : { } chunk , Data : { } diff , Option : { IsUnstaged : true , WorkingCopyChange : { } change } } )
1536+ if ( DataContext is not ViewModels . TextDiffContext { SelectedChunk : { } chunk , Data : { } diff , Option : { IsUnstaged : true , WorkingCopyChange : { } change } } vm )
15351537 return ;
15361538
15371539 var selection = diff . MakeSelection ( chunk . StartIdx + 1 , chunk . EndIdx + 1 , chunk . Combined , chunk . IsOldSide ) ;
@@ -1563,6 +1565,7 @@ private async void OnDiscardChunk(object _1, RoutedEventArgs _2)
15631565 await new Commands . Apply ( repo . FullPath , tmpFile , true , "nowarn" , "--reverse" ) . ExecAsync ( ) ;
15641566 File . Delete ( tmpFile ) ;
15651567
1568+ vm . BlockNavigation . UpdateByChunk ( chunk ) ;
15661569 repo . MarkWorkingCopyDirtyManually ( ) ;
15671570 }
15681571 }
0 commit comments