mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-01 21:21:15 -03:00
reader: use unqualified enum variants in match statement
This reduces noise although the indentation is not great.
This commit is contained in:
@@ -2610,24 +2610,27 @@ fn handle_char_event(&mut self, injected_event: Option<CharEvent>) -> ControlFlo
|
||||
}
|
||||
self.rls_mut().last_cmd = None;
|
||||
}
|
||||
CharEvent::Implicit(implicit_event) => match implicit_event {
|
||||
ImplicitEvent::Eof => reader_sighup(),
|
||||
ImplicitEvent::CheckExit => (),
|
||||
ImplicitEvent::FocusIn => {
|
||||
event::fire_generic(self.parser, L!("fish_focus_in").to_owned(), vec![]);
|
||||
self.save_screen_state();
|
||||
CharEvent::Implicit(implicit_event) => {
|
||||
use ImplicitEvent::*;
|
||||
match implicit_event {
|
||||
Eof => reader_sighup(),
|
||||
CheckExit => (),
|
||||
FocusIn => {
|
||||
event::fire_generic(self.parser, L!("fish_focus_in").to_owned(), vec![]);
|
||||
self.save_screen_state();
|
||||
}
|
||||
FocusOut => {
|
||||
event::fire_generic(self.parser, L!("fish_focus_out").to_owned(), vec![]);
|
||||
self.save_screen_state();
|
||||
}
|
||||
MouseLeft(position) => {
|
||||
FLOG!(reader, "Mouse left click", position);
|
||||
self.request_cursor_position(CursorPositionQuery::new(
|
||||
CursorPositionQueryKind::MouseLeft(position),
|
||||
));
|
||||
}
|
||||
}
|
||||
ImplicitEvent::FocusOut => {
|
||||
event::fire_generic(self.parser, L!("fish_focus_out").to_owned(), vec![]);
|
||||
self.save_screen_state();
|
||||
}
|
||||
ImplicitEvent::MouseLeft(position) => {
|
||||
FLOG!(reader, "Mouse left click", position);
|
||||
self.request_cursor_position(CursorPositionQuery::new(
|
||||
CursorPositionQueryKind::MouseLeft(position),
|
||||
));
|
||||
}
|
||||
},
|
||||
}
|
||||
CharEvent::QueryResult(query_result) => {
|
||||
let mut maybe_query = self.blocking_query();
|
||||
let query = &mut maybe_query;
|
||||
|
||||
Reference in New Issue
Block a user