aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/input.rs
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2021-07-03 03:06:52 +0000
committerGitHub <noreply@github.com>2021-07-03 03:06:52 +0000
commit4dd70ba3a155d1eebe38bcd5a5c4c03ca09f2fea (patch)
tree5fd25b77c2d46279cf3e23b699d47e06f02d43e4 /alacritty/src/input.rs
parentb0bc2a2440287268ca47ecf618c73766db9a2586 (diff)
downloadr-alacritty-4dd70ba3a155d1eebe38bcd5a5c4c03ca09f2fea.tar.gz
r-alacritty-4dd70ba3a155d1eebe38bcd5a5c4c03ca09f2fea.tar.bz2
r-alacritty-4dd70ba3a155d1eebe38bcd5a5c4c03ca09f2fea.zip
Fix clippy warnings
Diffstat (limited to 'alacritty/src/input.rs')
-rw-r--r--alacritty/src/input.rs38
1 files changed, 18 insertions, 20 deletions
diff --git a/alacritty/src/input.rs b/alacritty/src/input.rs
index 948ec67f..3258137c 100644
--- a/alacritty/src/input.rs
+++ b/alacritty/src/input.rs
@@ -148,19 +148,19 @@ impl<T: EventListener> Execute<T> for Action {
ctx.terminal_mut().vi_motion(*motion);
ctx.mark_dirty();
},
- Action::ViAction(ViAction::ToggleNormalSelection) => {
+ Action::Vi(ViAction::ToggleNormalSelection) => {
Self::toggle_selection(ctx, SelectionType::Simple);
},
- Action::ViAction(ViAction::ToggleLineSelection) => {
+ Action::Vi(ViAction::ToggleLineSelection) => {
Self::toggle_selection(ctx, SelectionType::Lines);
},
- Action::ViAction(ViAction::ToggleBlockSelection) => {
+ Action::Vi(ViAction::ToggleBlockSelection) => {
Self::toggle_selection(ctx, SelectionType::Block);
},
- Action::ViAction(ViAction::ToggleSemanticSelection) => {
+ Action::Vi(ViAction::ToggleSemanticSelection) => {
Self::toggle_selection(ctx, SelectionType::Semantic);
},
- Action::ViAction(ViAction::Open) => {
+ Action::Vi(ViAction::Open) => {
let hint = ctx.display().vi_highlighted_hint.take();
if let Some(hint) = &hint {
ctx.mouse_mut().block_hint_launcher = false;
@@ -168,7 +168,7 @@ impl<T: EventListener> Execute<T> for Action {
}
ctx.display().vi_highlighted_hint = hint;
},
- Action::ViAction(ViAction::SearchNext) => {
+ Action::Vi(ViAction::SearchNext) => {
let terminal = ctx.terminal();
let direction = ctx.search_direction();
let vi_point = terminal.vi_mode_cursor.point;
@@ -182,7 +182,7 @@ impl<T: EventListener> Execute<T> for Action {
ctx.mark_dirty();
}
},
- Action::ViAction(ViAction::SearchPrevious) => {
+ Action::Vi(ViAction::SearchPrevious) => {
let terminal = ctx.terminal();
let direction = ctx.search_direction().opposite();
let vi_point = terminal.vi_mode_cursor.point;
@@ -196,7 +196,7 @@ impl<T: EventListener> Execute<T> for Action {
ctx.mark_dirty();
}
},
- Action::ViAction(ViAction::SearchStart) => {
+ Action::Vi(ViAction::SearchStart) => {
let terminal = ctx.terminal();
let origin = terminal.vi_mode_cursor.point.sub(terminal, Boundary::None, 1);
@@ -205,7 +205,7 @@ impl<T: EventListener> Execute<T> for Action {
ctx.mark_dirty();
}
},
- Action::ViAction(ViAction::SearchEnd) => {
+ Action::Vi(ViAction::SearchEnd) => {
let terminal = ctx.terminal();
let origin = terminal.vi_mode_cursor.point.add(terminal, Boundary::None, 1);
@@ -214,25 +214,23 @@ impl<T: EventListener> Execute<T> for Action {
ctx.mark_dirty();
}
},
- Action::SearchAction(SearchAction::SearchFocusNext) => {
+ Action::Search(SearchAction::SearchFocusNext) => {
ctx.advance_search_origin(ctx.search_direction());
},
- Action::SearchAction(SearchAction::SearchFocusPrevious) => {
+ Action::Search(SearchAction::SearchFocusPrevious) => {
let direction = ctx.search_direction().opposite();
ctx.advance_search_origin(direction);
},
- Action::SearchAction(SearchAction::SearchConfirm) => ctx.confirm_search(),
- Action::SearchAction(SearchAction::SearchCancel) => ctx.cancel_search(),
- Action::SearchAction(SearchAction::SearchClear) => {
+ Action::Search(SearchAction::SearchConfirm) => ctx.confirm_search(),
+ Action::Search(SearchAction::SearchCancel) => ctx.cancel_search(),
+ Action::Search(SearchAction::SearchClear) => {
let direction = ctx.search_direction();
ctx.cancel_search();
ctx.start_search(direction);
},
- Action::SearchAction(SearchAction::SearchDeleteWord) => ctx.search_pop_word(),
- Action::SearchAction(SearchAction::SearchHistoryPrevious) => {
- ctx.search_history_previous()
- },
- Action::SearchAction(SearchAction::SearchHistoryNext) => ctx.search_history_next(),
+ Action::Search(SearchAction::SearchDeleteWord) => ctx.search_pop_word(),
+ Action::Search(SearchAction::SearchHistoryPrevious) => ctx.search_history_previous(),
+ Action::Search(SearchAction::SearchHistoryNext) => ctx.search_history_next(),
Action::SearchForward => ctx.start_search(Direction::Right),
Action::SearchBackward => ctx.start_search(Direction::Left),
Action::Copy => ctx.copy_selection(ClipboardType::Clipboard),
@@ -1036,7 +1034,7 @@ mod tests {
}
fn terminal(&self) -> &Term<T> {
- &self.terminal
+ self.terminal
}
fn terminal_mut(&mut self) -> &mut Term<T> {