Revert the wide-character backspace patch

Fixes #875
This commit is contained in:
Kovid Goyal
2018-09-09 13:51:15 +05:30
parent 1f63ff1d41
commit 16f712fbaa
2 changed files with 4 additions and 9 deletions

View File

@@ -708,15 +708,7 @@ screen_is_cursor_visible(Screen *self) {
void
screen_backspace(Screen *self) {
unsigned int amount = 1;
if (self->cursor->x < self->columns && self->cursor->x > 1) {
// check if previous character is a wide character
linebuf_init_line(self->linebuf, self->cursor->y);
unsigned int xpos = self->cursor->x - 2;
GPUCell *gpu_cell = self->linebuf->line->gpu_cells + xpos;
if ((gpu_cell->attrs & WIDTH_MASK) == 2) amount = 2;
}
screen_cursor_back(self, amount, -1);
screen_cursor_back(self, 1, -1);
}
void