From 1f46bb7b925e5a6ce2dc4e5eeb88449d4cb8ebc5 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Thu, 15 Apr 2021 21:25:49 +0000 Subject: Add hint action for moving the vi cursor Fixes #4319. --- alacritty/src/event.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'alacritty/src/event.rs') diff --git a/alacritty/src/event.rs b/alacritty/src/event.rs index 33b15928..3b24de0f 100644 --- a/alacritty/src/event.rs +++ b/alacritty/src/event.rs @@ -657,6 +657,15 @@ impl<'a, N: Notify + 'a, T: EventListener> input::ActionContext for ActionCon self.start_selection(SelectionType::Simple, *hint.bounds.start(), Side::Left); self.update_selection(*hint.bounds.end(), Side::Right); }, + // Move the vi mode cursor. + HintAction::Action(HintInternalAction::MoveViModeCursor) => { + // Enter vi mode if we're not in it already. + if !self.terminal.mode().contains(TermMode::VI) { + self.terminal.toggle_vi_mode(); + } + + self.terminal.vi_goto_point(*hint.bounds.start()); + }, } } -- cgit