feat: add enable/disable_alt_scroll commands
This commit is contained in:
parent
385478741f
commit
6828b24367
1 changed files with 11 additions and 0 deletions
|
|
@ -373,6 +373,7 @@ pub const Editor = struct {
|
||||||
handlers: EventHandler.List,
|
handlers: EventHandler.List,
|
||||||
scroll_dest: usize = 0,
|
scroll_dest: usize = 0,
|
||||||
fast_scroll: bool = false,
|
fast_scroll: bool = false,
|
||||||
|
alt_scroll: bool = false,
|
||||||
jump_mode: bool = false,
|
jump_mode: bool = false,
|
||||||
|
|
||||||
animation_step: usize = 0,
|
animation_step: usize = 0,
|
||||||
|
|
@ -5098,6 +5099,16 @@ pub const Editor = struct {
|
||||||
}
|
}
|
||||||
pub const disable_fast_scroll_meta: Meta = .{};
|
pub const disable_fast_scroll_meta: Meta = .{};
|
||||||
|
|
||||||
|
pub fn enable_alt_scroll(self: *Self, _: Context) Result {
|
||||||
|
self.alt_scroll = true;
|
||||||
|
}
|
||||||
|
pub const enable_alt_scroll_meta: Meta = .{ .description = "Enable horizontal scroll mode" };
|
||||||
|
|
||||||
|
pub fn disable_alt_scroll(self: *Self, _: Context) Result {
|
||||||
|
self.alt_scroll = false;
|
||||||
|
}
|
||||||
|
pub const disable_alt_scroll_meta: Meta = .{};
|
||||||
|
|
||||||
pub fn enable_jump_mode(self: *Self, _: Context) Result {
|
pub fn enable_jump_mode(self: *Self, _: Context) Result {
|
||||||
self.jump_mode = true;
|
self.jump_mode = true;
|
||||||
tui.rdr().request_mouse_cursor_pointer(true);
|
tui.rdr().request_mouse_cursor_pointer(true);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue