Skip to content

Commit 18f6ebf

Browse files
committed
Remove redundant calculations of inner_view
1 parent 846d392 commit 18f6ebf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

helix-term/src/ui/editor.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -715,11 +715,12 @@ impl EditorView {
715715
let primary_style = theme.get("ui.cursorline.primary");
716716
let secondary_style = theme.get("ui.cursorline.secondary");
717717

718+
let inner_area = view.inner_area();
718719
for line in view.offset.row..(last_line + 1) {
719720
let area = Rect::new(
720-
view.inner_area().x,
721-
view.inner_area().y + (line - view.offset.row) as u16,
722-
view.inner_area().width,
721+
inner_area.x,
722+
inner_area.y + (line - view.offset.row) as u16,
723+
inner_area.width,
723724
1,
724725
);
725726
if primary_line == line {

0 commit comments

Comments
 (0)