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
1 changed files with 1 additions and 1 deletions

View File

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