aboutsummaryrefslogtreecommitdiff
path: root/src/term/mod.rs
diff options
context:
space:
mode:
authorChristian Duerr <chrisduerr@users.noreply.github.com>2019-04-25 22:26:22 +0000
committerGitHub <noreply@github.com>2019-04-25 22:26:22 +0000
commit9c6d12ea2c863ba76015bdedc00db13b7307725a (patch)
tree265833fb56629789330ab3e287a3d1aac3018114 /src/term/mod.rs
parent494348abe80f591dfdd68fd4987bafc59fcb32c1 (diff)
downloadalacritty-9c6d12ea2c863ba76015bdedc00db13b7307725a.tar.gz
alacritty-9c6d12ea2c863ba76015bdedc00db13b7307725a.zip
Fix position of zero-width over double-width characters
Diffstat (limited to 'src/term/mod.rs')
-rw-r--r--src/term/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/term/mod.rs b/src/term/mod.rs
index a9a3841f..94b2ade2 100644
--- a/src/term/mod.rs
+++ b/src/term/mod.rs
@@ -1414,10 +1414,10 @@ impl ansi::Handler for Term {
// Handle zero-width characters
if width == 0 {
- let col = self.cursor.point.col.0.saturating_sub(1);
+ let mut col = self.cursor.point.col.0.saturating_sub(1);
let line = self.cursor.point.line;
if self.grid[line][Column(col)].flags.contains(cell::Flags::WIDE_CHAR_SPACER) {
- col.saturating_sub(1);
+ col = col.saturating_sub(1);
}
self.grid[line][Column(col)].push_extra(c);
return;