Skip to content

Commit

Permalink
Fix bug where abort switched windows
Browse files Browse the repository at this point in the history
The minibuffer code for handling going back to previous window
after abort was a bit too greedy.
  • Loading branch information
abbec committed Aug 27, 2024
1 parent fb22513 commit 991283f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/dged/minibuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,12 @@ static void minibuffer_abort_prompt_internal(bool clear) {
if (clear) {
minibuffer_clear();
}
g_minibuffer.prompt_active = false;

if (g_minibuffer.prev_window != NULL) {
if (g_minibuffer.prompt_active && g_minibuffer.prev_window != NULL) {
windows_set_active(g_minibuffer.prev_window);
}

g_minibuffer.prompt_active = false;
}

void minibuffer_abort_prompt() { minibuffer_abort_prompt_internal(true); }
Expand Down

0 comments on commit 991283f

Please sign in to comment.