mirror of
https://github.com/alacritty/alacritty.git
synced 2026-11-26 23:50:05 +03:00
1 parent
05917b2740
commit
1f46bb7b92
3 files changed
+13
No files matched your search
@@ -475,6 +475,8 @@
|
||||
# Paste the hint's text to the terminal or search.
|
||||
# - Select
|
||||
# Select the hint's text.
|
||||
# - MoveViModeCursor
|
||||
# Move the vi mode cursor to the beginning of the hint.
|
||||
#enabled:
|
||||
# - regex: "(mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\
|
||||
# [^\u0000-\u001F\u007F-\u009F<>\" {-}\\^⟨⟩`]+"
|
||||
|
||||
@@ -293,6 +293,8 @@ pub enum HintInternalAction {
|
||||
Paste,
|
||||
/// Select the text matching the hint.
|
||||
Select,
|
||||
/// Move the vi mode cursor to the beginning of the hint.
|
||||
MoveViModeCursor,
|
||||
}
|
||||
|
||||
/// Actions for hint bindings.
|
||||
|
||||
@@ -657,6 +657,15 @@ impl<'a, N: Notify + 'a, T: EventListener> input::ActionContext<T> 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());
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user