From 6c1027af8d54ad21e282337b53097eb196d62c00 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 17 Jun 2024 03:37:00 +0200 Subject: Fix `text_editor` always capturing scroll events --- graphics/src/text/editor.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'graphics') diff --git a/graphics/src/text/editor.rs b/graphics/src/text/editor.rs index 4b8f0f2a..c488a51c 100644 --- a/graphics/src/text/editor.rs +++ b/graphics/src/text/editor.rs @@ -456,14 +456,10 @@ impl editor::Editor for Editor { } } Action::Scroll { lines } => { - let (_, height) = editor.buffer().size(); - - if height < i32::MAX as f32 { - editor.action( - font_system.raw(), - cosmic_text::Action::Scroll { lines }, - ); - } + editor.action( + font_system.raw(), + cosmic_text::Action::Scroll { lines }, + ); } } -- cgit