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
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 9 deletions

View File

@ -26,6 +26,9 @@ Changelog
- Have the :option:`kitty --title` flag apply to all windows created
using :option:`kitty --session` (:iss:`921`)
- Revert change for backspacing of wide characters in the previous release,
as it breaks backspacing in some wide-character aware programs (:iss:`875`)
0.12.1 [2018-09-08]
------------------------------

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