1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-18 13:55:23 -05:00

Fix position of zero-width over double-width characters

This commit is contained in:
Christian Duerr 2019-04-25 22:26:22 +00:00 committed by GitHub
parent 494348abe8
commit 9c6d12ea2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- PTY size not getting updated when message bar is shown
- Text Cursor disappearing
- Incorrect positioning of zero-width characters over double-width characters
## Version 0.3.2

View file

@ -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;