mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
Merge pull request #2375 from ThePrimeagen/main
scroll_with_fractional would scroll by different line count depending on direction
This commit is contained in:
@ -3745,7 +3745,7 @@ pub fn performBindingAction(self: *Surface, action: input.Binding.Action) !bool
|
|||||||
|
|
||||||
.scroll_page_fractional => |fraction| {
|
.scroll_page_fractional => |fraction| {
|
||||||
const rows: f32 = @floatFromInt(self.grid_size.rows);
|
const rows: f32 = @floatFromInt(self.grid_size.rows);
|
||||||
const delta: isize = @intFromFloat(@floor(fraction * rows));
|
const delta: isize = @intFromFloat(@trunc(fraction * rows));
|
||||||
self.io.queueMessage(.{
|
self.io.queueMessage(.{
|
||||||
.scroll_viewport = .{ .delta = delta },
|
.scroll_viewport = .{ .delta = delta },
|
||||||
}, .unlocked);
|
}, .unlocked);
|
||||||
|
Reference in New Issue
Block a user