diff options
Diffstat (limited to 'src/term/mod.rs')
-rw-r--r-- | src/term/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/term/mod.rs b/src/term/mod.rs index 00244c8a..c9e3d9b2 100644 --- a/src/term/mod.rs +++ b/src/term/mod.rs @@ -24,7 +24,7 @@ use unicode_width::UnicodeWidthChar; use font::{self, Size}; use ansi::{self, Color, NamedColor, Attr, Handler, CharsetIndex, StandardCharset, CursorStyle}; -use grid::{BidirectionalIterator, Grid, ClearRegion, ToRange, Indexed}; +use grid::{BidirectionalIterator, Grid, ClearRegion, ToRange, Indexed, IndexRegion}; use index::{self, Point, Column, Line, Linear, IndexRange, Contains, RangeInclusive}; use selection::{self, Span, Selection}; use config::{Config, VisualBellAnimation}; @@ -1706,7 +1706,7 @@ impl ansi::Handler for Term { cell.reset(&template); } if self.cursor.point.line < self.grid.num_lines() - 1 { - for row in &mut self.grid[(self.cursor.point.line + 1)..] { + for row in self.grid.region_mut((self.cursor.point.line + 1)..) { for cell in row { cell.reset(&template); } @@ -1720,7 +1720,7 @@ impl ansi::Handler for Term { // If clearing more than one line if self.cursor.point.line > Line(1) { // Fully clear all lines before the current line - for row in &mut self.grid[..self.cursor.point.line] { + for row in self.grid.region_mut(..self.cursor.point.line) { for cell in row { cell.reset(&template); } |