Clear selection on grid swap

Fixes #3290.
This commit is contained in:
Rémi Garde 2020-04-21 01:38:25 +02:00 committed by GitHub
parent 03bce99ab6
commit 34daa1237b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Tabstops not being reset with `reset`
- Selection not cleared when switching between main and alt grid
## 0.4.2

View File

@ -1195,6 +1195,7 @@ impl<T> Term<T> {
let template = self.cursor.template;
self.grid.region_mut(..).each(|c| c.reset(&template));
}
self.grid.selection = None;
self.alt = !self.alt;
mem::swap(&mut self.grid, &mut self.alt_grid);