Skip to content

Commit fb00584

Browse files
authored
Update diff of conflicted file in the main view after conflicts have been resolved (#4945)
When lazygit detects that all conflicts have been resolved, it puts up a popup asking whether the user wants to continue the merge or rebase. However, it didn't rerender the main view of the conflicted file, so it would still show the conflict markers, which is confusing. Add some logic that updates the main view in this situation, behind the popup.
2 parents 3f30008 + 5fad3ab commit fb00584

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/gui/view_helpers.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ func (gui *Gui) postRefreshUpdate(c types.Context) {
157157
sidePanelContext.HandleRenderToMain()
158158
}
159159
}
160+
} else if c.GetKey() == gui.State.ContextMgr.CurrentStatic().GetKey() {
161+
// If our view is not the current one, but it is the current static context, then this
162+
// can only mean that a popup is showing. In that case we want to refresh the main view
163+
// behind the popup.
164+
c.HandleRenderToMain()
160165
}
161166
}
162167
}

0 commit comments

Comments
 (0)