Skip to content

Commit

Permalink
Fix: Escape commands popup back to edit mode (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
jooaf authored Oct 4, 2024
1 parent 2396d78 commit c4cf085
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/ui_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,12 @@ fn handle_normal_input(
}
}
KeyCode::Esc => {
state.scrollable_textarea.edit_mode = false;
state.edit_commands_popup.visible = false;
if state.edit_commands_popup.visible {
state.edit_commands_popup.visible = false;
} else {
state.scrollable_textarea.edit_mode = false;
state.edit_commands_popup.visible = false;
}

if state.error_popup.visible {
state.error_popup.hide();
Expand Down

0 comments on commit c4cf085

Please sign in to comment.