1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-25 14:05:41 -05:00

Fix fullwidth character crash on resize

Fixes #5383.
This commit is contained in:
Christian Duerr 2021-08-01 21:14:17 +00:00 committed by GitHub
parent 259e7c7a09
commit fd0fe967a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -792,7 +792,7 @@ impl<T> Term<T> {
// Remove wide char and spacer. // Remove wide char and spacer.
let wide = cursor_cell.flags.contains(Flags::WIDE_CHAR); let wide = cursor_cell.flags.contains(Flags::WIDE_CHAR);
let point = self.grid.cursor.point; let point = self.grid.cursor.point;
if wide && point.column <= self.last_column() { if wide && point.column < self.last_column() {
self.grid[point.line][point.column + 1].flags.remove(Flags::WIDE_CHAR_SPACER); self.grid[point.line][point.column + 1].flags.remove(Flags::WIDE_CHAR_SPACER);
} else if point.column > 0 { } else if point.column > 0 {
self.grid[point.line][point.column - 1].clear_wide(); self.grid[point.line][point.column - 1].clear_wide();