diff options
author | Christian Duerr <chrisduerr@users.noreply.github.com> | 2019-01-13 21:54:36 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-13 21:54:36 +0000 |
commit | 5864c30a54b250163c3a94f053f5f1b907adf9c9 (patch) | |
tree | cd694a5d51d447907ddcf25a2d7efbf1f1931bb9 /src | |
parent | 4caf3d32cd2e2c2c6a0e212e25d73061d8dec3af (diff) | |
download | alacritty-5864c30a54b250163c3a94f053f5f1b907adf9c9.tar.gz alacritty-5864c30a54b250163c3a94f053f5f1b907adf9c9.zip |
Fix tabs overwriting cells during movement
When compiling ncurses with the `--enable-hard-tabs` option, it will
make use of tabs to speed up cursor movement. These tabs can be set at
positions which will overwrite existing characters.
Since these are only for movement and not supposed to write anything to
the terminal, it is now checked that a cell does not contain any
character before writing a tab to it.
This fixes #1933.
Diffstat (limited to 'src')
-rw-r--r-- | src/term/mod.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/term/mod.rs b/src/term/mod.rs index a35a5df0..07cd27aa 100644 --- a/src/term/mod.rs +++ b/src/term/mod.rs @@ -1565,8 +1565,9 @@ impl ansi::Handler for Term { count -= 1; let cell = &mut self.grid[&self.cursor.point]; - *cell = self.cursor.template; - cell.c = self.cursor.charsets[self.active_charset].map('\t'); + if cell.c == ' ' { + cell.c = self.cursor.charsets[self.active_charset].map('\t'); + } loop { if (self.cursor.point.col + 1) == self.grid.num_cols() { |