fix(ui): return to main view after staging diff

This commit is contained in:
2026-06-19 00:08:08 -05:00
parent 79bd00d84d
commit 279fe6e7f9

View File

@@ -1008,9 +1008,11 @@ void DiffViewer::draw(RepositoryView& repository, GitManager& manager, AvatarCac
if (pending_hunk >= 0 && pending_hunk < static_cast<int>(hunks_.size())) {
const bool cached = pending_action != HunkAction::discard;
const bool reverse = pending_action != HunkAction::stage;
if (manager.applyPatch(repository, hunks_[pending_hunk].patch, cached, reverse, notice))
if (manager.applyPatch(repository, hunks_[pending_hunk].patch, cached, reverse, notice)) {
if (pending_action == HunkAction::stage) close();
reload(repository, manager, notice);
}
}
} else if (mode_ == Mode::blame) {
if (blame_lines_.empty()) {
ImGui::TextDisabled("No blame data is available for this file.");