editor: Represent scroll offset with more precision (#39367)
Closes #5355 Release Notes: - Fixed rendering glitches with files with more than 16 million lines (that occured due to floating number rounding errors). --------- Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
This commit is contained in:
co-authored by
Smit Barmase
parent
4c35274b6e
commit
d359a814f8
@@ -40,7 +40,8 @@ impl ModalContainerProperties {
|
||||
let font_size = style.font_size.to_pixels(window.rem_size());
|
||||
|
||||
if let Ok(em_width) = window.text_system().em_width(font_id, font_size) {
|
||||
modal_width = preferred_char_width as f32 * em_width.0 + (container_padding * 2.0);
|
||||
modal_width =
|
||||
f32::from(preferred_char_width as f32 * em_width + px(container_padding * 2.0));
|
||||
}
|
||||
|
||||
Self {
|
||||
|
||||
Reference in New Issue
Block a user