Fix text_editor always capturing scroll events
This commit is contained in:
parent
e9141e7abf
commit
6c1027af8d
2 changed files with 10 additions and 8 deletions
|
|
@ -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 },
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue