From 098eca8d10156d450f3abcca74cb26febe93b7a9 Mon Sep 17 00:00:00 2001 From: Joe Wilm Date: Mon, 6 Feb 2017 12:11:35 -0800 Subject: Fix zsh tab completion --- src/term/mod.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/term/mod.rs b/src/term/mod.rs index 633aa904..58a5b314 100644 --- a/src/term/mod.rs +++ b/src/term/mod.rs @@ -779,7 +779,6 @@ impl ansi::Handler for Term { /// A character to be displayed #[inline] fn input(&mut self, c: char) { - if self.input_needs_wrap { if !self.mode.contains(mode::LINE_WRAP) { @@ -1124,9 +1123,14 @@ impl ansi::Handler for Term { let template = self.empty_cell; match mode { ansi::ClearMode::Below => { - for row in &mut self.grid[self.cursor.point.line..] { - for cell in row { - cell.reset(&template); + for cell in &mut self.grid[self.cursor.point.line][self.cursor.point.col..] { + 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 cell in row { + cell.reset(&template); + } } } }, -- cgit v1.2.3-54-g00ecf