Fix vertical position in first_rect_for_character_range

This commit is contained in:
Max Brunsfeld 2023-11-08 17:27:32 -08:00
parent 86865431b9
commit 277fbda356
2 changed files with 14 additions and 16 deletions

View file

@ -1485,7 +1485,9 @@ extern "C" fn first_rect_for_character_range(
NSRect::new(
NSPoint::new(
frame.origin.x + bounds.origin.x.0 as f64,
frame.origin.y + frame.size.height - bounds.origin.y.0 as f64,
frame.origin.y + frame.size.height
- bounds.origin.y.0 as f64
- bounds.size.height.0 as f64,
),
NSSize::new(bounds.size.width.0 as f64, bounds.size.height.0 as f64),
)