Scroll at least one line on macOS in TextEditor

This commit is contained in:
Héctor Ramón Jiménez 2023-09-21 06:13:08 +02:00
parent da5dd2526a
commit 7373dd856b
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -545,7 +545,11 @@ impl Update {
action(Action::Scroll {
lines: match delta {
mouse::ScrollDelta::Lines { y, .. } => {
-y.round() as i32 * 4
if y > 0.0 {
-(y * 4.0).min(1.0) as i32
} else {
0
}
}
mouse::ScrollDelta::Pixels { y, .. } => {
-y.signum() as i32