diff options
-rw-r--r-- | PKGBUILD | 2 | ||||
-rw-r--r-- | fullwidth-emoji.patch | 30 |
2 files changed, 31 insertions, 1 deletions
@@ -14,7 +14,7 @@ makedepends=('intltool' 'gobject-introspection' 'gtk3' 'vala' 'gtk-doc' 'gperf') url="https://github.com/thestinger/vte-ng" source=(https://github.com/thestinger/vte-ng/archive/$pkgver.tar.gz fullwidth-emoji.patch) sha256sums=('97f1572b1080614b9dcf261a8abe4c7bfd840f7dc91e9bb29ffe310525b28443' - '0a842a9a7a1a053c8c3ac107a42021fbcaf195a87996939717fc52400ae061d2') + 'dfa3510b1c0839a337e1c12faa10b1a3049f0e44881d4ff2496eb0a3ad4335e1') provides=(vte3=$_basever vte3-select-text=$_basever vte3-ng) conflicts=(vte3 vte3-select-text vte3-ng) replaces=(vte3-select-text vte3-ng) diff --git a/fullwidth-emoji.patch b/fullwidth-emoji.patch index ebbbd6ac0fce..15b28e9e5454 100644 --- a/fullwidth-emoji.patch +++ b/fullwidth-emoji.patch @@ -12,3 +12,33 @@ if (G_LIKELY (utf8_ambiguous_width == 1)) return 1; if (G_UNLIKELY (g_unichar_iswide_cjk (c))) +--- a/vte-ng-0.42.4.a/src/vteseq.cc 2016-03-21 22:23:38.886288772 +0800 ++++ b/vte-ng-0.42.4.a/src/vteseq.cc 2016-03-21 23:02:19.447553445 +0800 +@@ -1533,12 +1533,23 @@ + static void + vte_sequence_handler_backspace (VteTerminal *terminal, GValueArray *params) + { ++ struct termios tio; + _vte_terminal_ensure_cursor_is_onscreen(terminal); +- +- if (terminal->pvt->screen->cursor.col > 0) { +- /* There's room to move left, so do so. */ ++ g_assert(tcgetattr(vte_pty_get_fd(terminal->pvt->pty), &tio) == 0); ++ if (tio.c_lflag & ICANON && tio.c_iflag & IUTF8) { ++ VteRowData *rowdata = _vte_terminal_ensure_row(terminal); ++ int col = terminal->pvt->screen->cursor.col; ++ if (col == 0) ++ ; ++ else if (col > rowdata->len) ++ col--; ++ else ++ col = MAX(col - rowdata->cells[col-1].attr.columns, 0); ++ terminal->pvt->screen->cursor.col = col; ++ } else if (terminal->pvt->screen->cursor.col > 0) { ++ /* There's room to move left, so do so. */ + terminal->pvt->screen->cursor.col--; +- } ++ } + } + + /* Cursor left N columns. */ |