Fix panic when scrolling a TextEditor inside a scrollable
This commit is contained in:
parent
40c4aa8ff2
commit
3762c0590c
1 changed files with 8 additions and 4 deletions
|
|
@ -456,10 +456,14 @@ impl editor::Editor for Editor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Action::Scroll { lines } => {
|
Action::Scroll { lines } => {
|
||||||
editor.action(
|
let (_, height) = editor.buffer().size();
|
||||||
font_system.raw(),
|
|
||||||
cosmic_text::Action::Scroll { lines },
|
if height < i32::MAX as f32 {
|
||||||
);
|
editor.action(
|
||||||
|
font_system.raw(),
|
||||||
|
cosmic_text::Action::Scroll { lines },
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue