terminal: filter out of bounds atoms
This commit is contained in:
parent
cee6e02a04
commit
edb8416f67
1 changed files with 1 additions and 1 deletions
|
@ -169,7 +169,7 @@ impl TermOutWriter {
|
||||||
if let Some(view) = self.view.read().unwrap().as_ref() {
|
if let Some(view) = self.view.read().unwrap().as_ref() {
|
||||||
let mut out = self.out.write().unwrap();
|
let mut out = self.out.write().unwrap();
|
||||||
|
|
||||||
for pos in dirty_pos.into_iter() {
|
for pos in dirty_pos.into_iter().filter(|p| p.x >= 0 && p.y >= 0) {
|
||||||
if pos != cur_pos {
|
if pos != cur_pos {
|
||||||
write!(out, "{}", termion::cursor::Goto(pos.x as u16 + 1, pos.y as u16 + 1))?;
|
write!(out, "{}", termion::cursor::Goto(pos.x as u16 + 1, pos.y as u16 + 1))?;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue