Merge pull request #1051 from RGBCube/main

input: add scroll_page_lines
This commit is contained in:
Mitchell Hashimoto
2023-12-11 12:45:35 -08:00
committed by GitHub
2 changed files with 8 additions and 0 deletions

View File

@ -2701,6 +2701,13 @@ pub fn performBindingAction(self: *Surface, action: input.Binding.Action) !bool
try self.io_thread.wakeup.notify();
},
.scroll_page_lines => |lines| {
_ = self.io_thread.mailbox.push(.{
.scroll_viewport = .{ .delta = lines },
}, .{ .forever = {} });
try self.io_thread.wakeup.notify();
},
.jump_to_prompt => |delta| {
_ = self.io_thread.mailbox.push(.{
.jump_to_prompt = @intCast(delta),

View File

@ -167,6 +167,7 @@ pub const Action = union(enum) {
scroll_page_up: void,
scroll_page_down: void,
scroll_page_fractional: f32,
scroll_page_lines: i16,
/// Jump the viewport forward or back by prompt. Positive
/// number is the number of prompts to jump forward, negative