Popup menus do not set previous state, so Esc always returns to the main previous state. Fixes #8 and closes #11.

This commit is contained in:
Antoine POPINEAU 2021-05-26 11:51:56 +02:00
parent ec1f8dc386
commit 8a1f7c317c
No known key found for this signature in database
GPG Key ID: A78AC64694F84063

View File

@ -27,12 +27,10 @@ pub fn handle(greeter: &mut Greeter, events: &Events) -> Result<(), Box<dyn Erro
Key::F(2) => {
greeter.new_command = greeter.command.clone().unwrap_or_default();
greeter.previous_mode = greeter.mode;
greeter.mode = Mode::Command;
}
Key::F(3) => {
greeter.previous_mode = greeter.mode;
greeter.mode = Mode::Sessions;
}