Skip to content

Commit

Permalink
Scroll at least one line on macOS in TextEditor
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Sep 21, 2023
1 parent da5dd25 commit 2595211
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion widget/src/text_editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Check failure on line 548 in widget/src/text_editor.rs

View workflow job for this annotation

GitHub Actions / web

mismatched closing delimiter: `)`

Check failure on line 548 in widget/src/text_editor.rs

View workflow job for this annotation

GitHub Actions / all

mismatched closing delimiter: `)`

Check failure on line 548 in widget/src/text_editor.rs

View workflow job for this annotation

GitHub Actions / all

mismatched closing delimiter: `)`

Check failure on line 548 in widget/src/text_editor.rs

View workflow job for this annotation

GitHub Actions / all

mismatched closing delimiter: `)`

Check failure on line 548 in widget/src/text_editor.rs

View workflow job for this annotation

GitHub Actions / native (macOS-latest, stable)

mismatched closing delimiter: `)`

Check failure on line 548 in widget/src/text_editor.rs

View workflow job for this annotation

GitHub Actions / native (macOS-latest, beta)

mismatched closing delimiter: `)`
-(y * 4.0).min(1.0)) as i32
} else {
0.0
}
}
mouse::ScrollDelta::Pixels { y, .. } => {
-y.signum() as i32
Expand Down

0 comments on commit 2595211

Please sign in to comment.