Skip to content

Commit

Permalink
add InMemoryTerm::reset()
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-laplante authored and djc committed Jun 13, 2022
1 parent de9862b commit f41eaa9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/in_memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ impl InMemoryTerm {
}
}

pub fn reset(&self) {
let mut state = self.state.lock().unwrap();
*state = InMemoryTermState::new(state.parser.screen().size().0, state.width);
}

pub fn contents(&self) -> String {
let state = self.state.lock().unwrap();

Expand Down

0 comments on commit f41eaa9

Please sign in to comment.