feat(keybind): move selection mode into keybind mode configuration
This commit is contained in:
parent
70f0d8bea6
commit
4f5fa4a3ba
6 changed files with 82 additions and 72 deletions
|
@ -951,13 +951,11 @@ const cmds = struct {
|
|||
|
||||
pub fn enter_helix_mode(_: *Self, _: Ctx) Result {
|
||||
try @import("mode/helix.zig").init();
|
||||
if (get_active_editor()) |editor| editor.enable_helix_selection = true;
|
||||
}
|
||||
pub const enter_helix_mode_meta = .{};
|
||||
|
||||
pub fn exit_helix_mode(_: *Self, _: Ctx) Result {
|
||||
@import("mode/helix.zig").deinit();
|
||||
if (get_active_editor()) |editor| editor.enable_helix_selection = false;
|
||||
}
|
||||
pub const exit_helix_mode_meta = .{};
|
||||
};
|
||||
|
@ -1174,3 +1172,7 @@ pub fn is_cursor_beam(self: *Self) bool {
|
|||
else => false,
|
||||
};
|
||||
}
|
||||
|
||||
pub fn get_selection_style(self: *Self) @import("Buffer").Selection.Style {
|
||||
return if (self.input_mode) |mode| mode.selection_style else .normal;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue