diff options
-rw-r--r-- | PKGBUILD | 2 | ||||
-rw-r--r-- | fullwidth-backspace.patch | 6 |
2 files changed, 4 insertions, 4 deletions
@@ -15,7 +15,7 @@ provides=('tmux') conflicts=('tmux') md5sums=('74a2855695bccb51b6e301383ad4818c' '71601bc37fa44e4395580b321963018e' - 'b1377bfcce58b627c5cfa32913493cf6') + '2bb338d95e88265689f5b981c317b6a3') prepare() { patch -p1 < ../fullwidth-backspace.patch diff --git a/fullwidth-backspace.patch b/fullwidth-backspace.patch index 4d6cd57afd48..f519417ce384 100644 --- a/fullwidth-backspace.patch +++ b/fullwidth-backspace.patch @@ -20,12 +20,12 @@ - s->cx--; + } else { + struct termios tio; -+ int fd = open(ctx->wp->tty, O_RDONLY); ++ int fd = open(ctx->wp->tty, O_RDONLY); + assert(tcgetattr(fd, &tio) == 0); -+ close(fd); ++ close(fd); + if (tio.c_lflag & ICANON && tio.c_iflag & IUTF8) { + gl = &s->grid->linedata[s->grid->hsize + s->cy]; -+ if (s->cx >= 2 && grid_cell_width(&gl->celldata[s->cx-2]) == 2) ++ if (s->cx >= 2 && s->cx-2 < gl->cellsize && grid_cell_width(&gl->celldata[s->cx-2]) == 2) + s->cx -= 2; + else + s->cx--; |