fix(merge): unresolved conflicts compose to empty, not Ours (+ review nits)
Code-review follow-ups before push:
- MergeFile.ResultText/Compose() fell back to Ours for unresolved conflicts while
the editor seeds them empty — align both on empty so the public model matches the
pane and Continue can't silently auto-accept Ours.
- Bound the gutter re-layout retry (was an unbounded Background re-post when the
editor isn't laid out, e.g. minimized).
- Pluralize the readout ('1 conflict' not '1 conflicts'). Tests updated. Ui 128 green.
This commit is contained in:
@@ -40,6 +40,7 @@ public partial class ConflictResolverView : Window
|
||||
private bool _applyingAccept;
|
||||
private bool _syncing;
|
||||
private bool _gutterPending;
|
||||
private int _gutterRetries;
|
||||
|
||||
public ConflictResolverView()
|
||||
{
|
||||
@@ -109,6 +110,7 @@ public partial class ConflictResolverView : Window
|
||||
{
|
||||
if (_vm is null) return;
|
||||
_rebuilding = true;
|
||||
_gutterRetries = 0; // fresh retry budget for this file's gutter layout
|
||||
try
|
||||
{
|
||||
ClearGutters();
|
||||
@@ -257,9 +259,12 @@ public partial class ConflictResolverView : Window
|
||||
var tv = ResultEditor.TextArea.TextView;
|
||||
if (!tv.VisualLinesValid)
|
||||
{
|
||||
QueueGutters();
|
||||
// Retry until the editor is laid out, but bounded so a never-laid-out editor
|
||||
// (e.g. minimized window) can't busy-loop the dispatcher.
|
||||
if (_gutterRetries++ < 40) QueueGutters();
|
||||
return;
|
||||
}
|
||||
_gutterRetries = 0;
|
||||
|
||||
var doc = ResultEditor.Document;
|
||||
foreach (var region in _resultRegions)
|
||||
|
||||
Reference in New Issue
Block a user