mirror of
https://github.com/apognu/tuigreet.git
synced 2024-09-11 07:25:29 +03:00
Restore previous buffer when validating new command.
This commit is contained in:
parent
6426cd597b
commit
571677dec6
@ -194,6 +194,7 @@ pub async fn handle(greeter: Arc<RwLock<Greeter>>, input: KeyEvent, ipc: Ipc) ->
|
||||
_ => greeter.mode,
|
||||
};
|
||||
|
||||
greeter.buffer = greeter.previous_buffer.take().unwrap_or_default();
|
||||
greeter.mode = Mode::Users;
|
||||
}
|
||||
|
||||
@ -221,6 +222,7 @@ pub async fn handle(greeter: Arc<RwLock<Greeter>>, input: KeyEvent, ipc: Ipc) ->
|
||||
delete_last_session_path();
|
||||
}
|
||||
|
||||
greeter.buffer = greeter.previous_buffer.take().unwrap_or_default();
|
||||
greeter.mode = greeter.previous_mode;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user