feat: add cancel action to idle_actions
This commit is contained in:
parent
8d153d6647
commit
2ca613c5a6
2 changed files with 5 additions and 0 deletions
|
|
@ -79,6 +79,7 @@ const default_actions = [_]IdleAction{};
|
|||
pub const IdleAction = enum {
|
||||
hover,
|
||||
highlight_references,
|
||||
cancel,
|
||||
};
|
||||
|
||||
pub const DigitStyle = enum {
|
||||
|
|
|
|||
|
|
@ -6928,6 +6928,10 @@ pub const EditorWidget = struct {
|
|||
try self.editor.hover_at_abs(@intCast(self.hover_y), @intCast(self.hover_x));
|
||||
} else if (try m.match(.{"input_idle"})) {
|
||||
for (tui.config().idle_actions) |action| switch (action) {
|
||||
.cancel => {
|
||||
self.editor.cancel_all_matches();
|
||||
tui.need_render();
|
||||
},
|
||||
.hover => {
|
||||
try self.editor.hover(.{});
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue