Skip to content

Commit

Permalink
🔧 Minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
nwrenger committed Apr 6, 2024
1 parent 21bd95c commit a65b928
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/ui/edit_area.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ pub struct EditArea {

/// Cache to avoid re-computing layout on no-op events
size_cache: Option<XY<SizeCache>>,
last_size: Vec2,

/// Byte offset of the currently selected grapheme.
cursor: usize,
Expand Down Expand Up @@ -117,7 +116,6 @@ impl EditArea {
enabled: true,
on_edit: None,
scroll_core: scroll::Core::new(),
last_size: Vec2::zero(),
size_cache: None,
cursor: 0,
}
Expand Down Expand Up @@ -741,7 +739,6 @@ impl EditArea {
Event::Key(Key::Del) if self.cursor < self.content.len() => {
return EventResult::Consumed(Some(self.delete()));
}

Event::Key(Key::End) => {
let row = self.selected_row();
self.cursor = self.rows[row].end;
Expand Down Expand Up @@ -908,7 +905,6 @@ impl View for EditArea {
}

fn layout(&mut self, size: Vec2) {
self.last_size = size;
scroll::layout(self, size, true, |_s, _size| (), Self::inner_required_size);
}

Expand Down

0 comments on commit a65b928

Please sign in to comment.