mirror of
https://github.com/wez/wezterm.git
synced 2024-11-14 03:16:09 +03:00
macos: clear scroll remainder when changing scroll direction
This commit is contained in:
parent
97c71eb91f
commit
a61d3a1b99
@ -1871,6 +1871,14 @@ impl WindowView {
|
||||
|
||||
inner.last_wheel = Instant::now();
|
||||
|
||||
// Reset remainder when changing scroll direction
|
||||
if vert_delta.signum() != inner.vscroll_remainder.signum() {
|
||||
inner.vscroll_remainder = 0.;
|
||||
}
|
||||
if horz_delta.signum() != inner.hscroll_remainder.signum() {
|
||||
inner.hscroll_remainder = 0.;
|
||||
}
|
||||
|
||||
vert_delta += inner.vscroll_remainder;
|
||||
horz_delta += inner.hscroll_remainder;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user