improve popup rendering

This commit is contained in:
alice pellerin
2026-03-22 03:55:42 -05:00
parent ab5b7d4720
commit 86e13d5b01
5 changed files with 69 additions and 64 deletions
+6 -4
View File
@@ -50,10 +50,12 @@ impl Widget for &Buffer {
let position_on_screen = popup.at - self.scroll_position;
let hex_column = position_on_screen % BYTES_PER_LINE;
let popup_area = popup.area_at(
area.x + byte_column_to_screen_column(hex_column) as u16,
area.y + (position_on_screen / BYTES_PER_LINE) as u16 + 1
);
let popup_area = popup
.area_at(
area.x + byte_column_to_screen_column(hex_column) as u16,
area.y + (position_on_screen / BYTES_PER_LINE) as u16 + 1
)
.clamp(hex_area);
popup.clone().render(popup_area, buf);
}