feat: scroll editor horizontally when in alt scroll mode

This commit is contained in:
CJ van den Berg 2026-01-14 11:11:19 +01:00
parent 6828b24367
commit 1dc0fcf9b5
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -2794,16 +2794,20 @@ pub const Editor = struct {
self.update_scroll_dest_abs(dest.row); self.update_scroll_dest_abs(dest.row);
} }
pub fn scroll_up_pageup(self: *Self, _: Context) Result { pub fn scroll_up_pageup(self: *Self, ctx: Context) Result {
if (self.fast_scroll) if (self.alt_scroll)
try self.move_scroll_left(ctx)
else if (self.fast_scroll)
self.scroll_pageup() self.scroll_pageup()
else else
self.scroll_up(); self.scroll_up();
} }
pub const scroll_up_pageup_meta: Meta = .{}; pub const scroll_up_pageup_meta: Meta = .{};
pub fn scroll_down_pagedown(self: *Self, _: Context) Result { pub fn scroll_down_pagedown(self: *Self, ctx: Context) Result {
if (self.fast_scroll) if (self.alt_scroll)
try self.move_scroll_right(ctx)
else if (self.fast_scroll)
self.scroll_pagedown() self.scroll_pagedown()
else else
self.scroll_down(); self.scroll_down();