Support editor::SelectAll in Terminal
This commit is contained in:
parent
404b1aa65a
commit
de69f08c10
2 changed files with 14 additions and 0 deletions
|
@ -987,6 +987,14 @@ impl Terminal {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn select_all(&mut self) {
|
||||
let term = self.term.lock();
|
||||
let start = Point::new(term.topmost_line(), Column(0));
|
||||
let end = Point::new(term.bottommost_line(), term.last_column());
|
||||
drop(term);
|
||||
self.set_selection(Some((make_selection(&(start..=end)), end)));
|
||||
}
|
||||
|
||||
fn set_selection(&mut self, selection: Option<(Selection, Point)>) {
|
||||
self.events
|
||||
.push_back(InternalEvent::SetSelection(selection));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue