From 6828b24367e46a8367b0c62d2ae7820431e2d2f2 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Wed, 14 Jan 2026 11:10:46 +0100 Subject: [PATCH] feat: add enable/disable_alt_scroll commands --- src/tui/editor.zig | 11 +++++++++++ 1 file changed, 11 insertions(+) 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);