fix(ui): offload UnifiedDiffParser.Parse off the UI thread in DiffViewerViewModel
Both call sites (LoadFilesAsync, OnDisplayedDiffChanged) ran the parser synchronously on the dispatcher, freezing the window on a large diff. The Files-mode parse+tree-build now runs via Task.Run behind a ParseOp OperationStatus wired to the toolbar; the planning-mode parse is fire-and-forget with a generation counter so a fast second DisplayedDiff change can't write stale PlanningFiles.
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
ToolTip.Tip="{loc:Tr modals.diff.wrapLines}">
|
||||
<PathIcon Data="{StaticResource Icon.Wrap}" Width="14" Height="14"/>
|
||||
</ToggleButton>
|
||||
<ctl:OperationIndicator Status="{Binding ParseOp}"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Planning toolbar: combined-mode toggle + warning/loading -->
|
||||
|
||||
Reference in New Issue
Block a user