diff --git a/src/tui/editor.zig b/src/tui/editor.zig index e126bbc..72ed088 100644 --- a/src/tui/editor.zig +++ b/src/tui/editor.zig @@ -373,6 +373,7 @@ pub const Editor = struct { handlers: EventHandler.List, scroll_dest: usize = 0, fast_scroll: bool = false, + alt_scroll: bool = false, jump_mode: bool = false, animation_step: usize = 0, @@ -5098,6 +5099,16 @@ pub const Editor = struct { } 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 { self.jump_mode = true; tui.rdr().request_mouse_cursor_pointer(true);