support 'h' to print help message during toplevel interaction
This commit is contained in:
@@ -33,6 +33,7 @@ use crate::crossterm::terminal::{enable_raw_mode, disable_raw_mode};
|
||||
pub enum ContinueResult {
|
||||
ContinueQuery,
|
||||
Conclude,
|
||||
Help,
|
||||
PrintWithoutMaxDepth,
|
||||
PrintWithMaxDepth
|
||||
}
|
||||
@@ -54,6 +55,9 @@ pub fn next_keypress() -> ContinueResult {
|
||||
KeyCode::Char('.') => {
|
||||
return ContinueResult::Conclude;
|
||||
}
|
||||
KeyCode::Char('h') => {
|
||||
return ContinueResult::Help;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
@@ -2351,6 +2355,7 @@ impl MachineState {
|
||||
let c = match keypress {
|
||||
ContinueResult::ContinueQuery => ';',
|
||||
ContinueResult::Conclude => '.',
|
||||
ContinueResult::Help => 'h',
|
||||
ContinueResult::PrintWithoutMaxDepth => 'w',
|
||||
ContinueResult::PrintWithMaxDepth => 'p',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user