diff options
Diffstat (limited to '')
-rw-r--r-- | widget/src/text_editor.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/widget/src/text_editor.rs b/widget/src/text_editor.rs index 41b058af..fc2ade43 100644 --- a/widget/src/text_editor.rs +++ b/widget/src/text_editor.rs @@ -466,6 +466,12 @@ where shell.publish(on_edit(action)); } Update::Scroll(lines) => { + let bounds = self.content.0.borrow().editor.bounds(); + + if bounds.height >= i32::MAX as f32 { + return event::Status::Ignored; + } + let lines = lines + state.partial_scroll; state.partial_scroll = lines.fract(); |