push help view to stack instead of making it a separate screen

fixes #157
This commit is contained in:
Henrik Friedrichsen
2020-03-21 15:51:35 +01:00
parent 9e68ed0ba6
commit 082675a5d7
4 changed files with 15 additions and 6 deletions

View File

@@ -87,6 +87,7 @@ pub enum Command {
Move(MoveMode, Option<i32>),
Shift(ShiftMode, Option<i32>),
Search(String),
Help,
}
impl fmt::Display for Command {
@@ -126,6 +127,7 @@ impl fmt::Display for Command {
Command::Move(mode, amount) => format!("move {} {}", mode, amount.unwrap_or(1)),
Command::Shift(mode, amount) => format!("shift {} {}", mode, amount.unwrap_or(1)),
Command::Search(term) => format!("search {}", term),
Command::Help => "help".to_string(),
};
write!(f, "{}", repr)
}