Skip to content

Commit

Permalink
Restore previous buffer when validating new command.
Browse files Browse the repository at this point in the history
  • Loading branch information
apognu committed Nov 8, 2023
1 parent 6426cd5 commit 571677d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/keyboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 571677d

Please sign in to comment.