Skip to content

Commit

Permalink
status bar reset fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Kacperacy committed Jun 6, 2024
1 parent aa435c1 commit fb8d997
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use ratatui::layout::Rect;
pub type AppResult<T> = std::result::Result<T, Box<dyn error::Error>>;

const QUIT_TIMES: i8 = 2;
const DEFAULT_STATUS: &str = "Press Ctrl + C to quit, Ctrl + S to save to file";
const DEFAULT_STATUS: &str = "Press Ctrl + C to quit, Ctrl + S to save.";

#[derive(Debug)]
pub struct Direction {
Expand Down Expand Up @@ -239,7 +239,9 @@ impl App {
return;
}

self.status = DEFAULT_STATUS.into();
if self.status != DEFAULT_STATUS {
self.status = DEFAULT_STATUS.into();
}

let pos = self.get_cursor_position();

Expand Down

0 comments on commit fb8d997

Please sign in to comment.