mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-21 03:21:16 -03:00
Remove set-mode char event
Use generic shell commands instead. This keeps us honest. No functional change expected.
This commit is contained in:
@@ -129,9 +129,6 @@ pub enum CharEventType {
|
||||
/// A shell command.
|
||||
Command(WString),
|
||||
|
||||
/// A request to change the input mapping mode.
|
||||
SetMode(WString),
|
||||
|
||||
/// end-of-file was reached.
|
||||
Eof,
|
||||
|
||||
@@ -173,7 +170,7 @@ pub fn is_readline(&self) -> bool {
|
||||
pub fn is_readline_or_command(&self) -> bool {
|
||||
matches!(
|
||||
self.evt,
|
||||
CharEventType::Readline(_) | CharEventType::Command(_) | CharEventType::SetMode(_)
|
||||
CharEventType::Readline(_) | CharEventType::Command(_)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -206,13 +203,6 @@ pub fn get_command(&self) -> Option<&wstr> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_mode(&self) -> Option<&wstr> {
|
||||
match &self.evt {
|
||||
CharEventType::SetMode(m) => Some(m),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn from_char(c: char) -> CharEvent {
|
||||
CharEvent {
|
||||
evt: CharEventType::Char(c),
|
||||
@@ -241,14 +231,6 @@ pub fn from_command(cmd: WString) -> CharEvent {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn from_set_mode(mode: WString) -> CharEvent {
|
||||
CharEvent {
|
||||
evt: CharEventType::SetMode(mode),
|
||||
input_style: CharInputStyle::Normal,
|
||||
seq: WString::new(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn from_check_exit() -> CharEvent {
|
||||
CharEvent {
|
||||
evt: CharEventType::CheckExit,
|
||||
|
||||
Reference in New Issue
Block a user