Use display maps

This commit is contained in:
Piotr Osiewicz 2023-08-08 02:37:27 +02:00
parent 241d3951b8
commit b0fc6da55b
2 changed files with 15 additions and 12 deletions

View file

@ -1117,9 +1117,9 @@ impl EditorElement {
bottom: false,
left: true,
};
let mut push_region = |start: u32, end: u32| {
let start_y = y_for_row(start as f32);
let mut end_y = y_for_row(end as f32);
let mut push_region = |start: DisplayPoint, end: DisplayPoint| {
let start_y = y_for_row(start.row() as f32);
let mut end_y = y_for_row(end.row() as f32);
if end_y - start_y < 1. {
end_y = start_y + 1.;
}