fix(ui): return to main view after staging diff
This commit is contained in:
@@ -1008,8 +1008,10 @@ 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()) {
|
||||
|
||||
Reference in New Issue
Block a user