Skip to content

Commit

Permalink
Fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Feb 3, 2024
1 parent db9ca1a commit 7197984
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions widget/src/text_editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -406,12 +406,13 @@ where

shell.publish(on_edit(action));
}
Update::Scroll(mut lines) => {
lines += state.partial_scroll;
Update::Scroll(lines) => {
let lines = lines + state.partial_scroll;
state.partial_scroll = lines.fract();

shell.publish(on_edit(Action::Scroll {
lines: lines as i32,
}))
}));
}
Update::Unfocus => {
state.is_focused = false;
Expand Down

0 comments on commit 7197984

Please sign in to comment.