Skip to content

Commit

Permalink
fix: remove flicker on delete
Browse files Browse the repository at this point in the history
  • Loading branch information
millotp committed May 27, 2024
1 parent a947f8f commit ca66f66
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ impl Vaultwalker {

fn print_controls(&mut self) -> Result<()> {
self.print_info(
"Navigate with arrows or HJKL copy [P]ath copy [S]ecret [A]dd secret [R]ename key [U]pdate secret [D]elete secret [Q]uit [C]lear cache [O]pen help",
"Navigate with arrows or HJKL copy [P]ath copy [S]ecret [A]dd secret [R]ename key [U]pdate secret [D]elete secret [Q]uit [C]lear cache [O]pen help",
)
}

Expand Down Expand Up @@ -591,6 +591,9 @@ impl Vaultwalker {
execute!(stdout(), Print(" "))?;

let answer = read_line()?;
// because the user presses on new line, we need to reset it
self.print()?;

let mut result_message = format!("received '{}', the key was not deleted", answer);
if answer == "yes" {
let mut path = self.path.join();
Expand Down

0 comments on commit ca66f66

Please sign in to comment.