Mercurial > vim
diff src/libvterm/src/unicode.c @ 20443:e02d45e302a2 v8.2.0776
patch 8.2.0776: libvterm code lags behind the upstream version
Commit: https://github.com/vim/vim/commit/e178ba36546ec7805020280910306331f1ef4ed0
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun May 17 14:59:47 2020 +0200
patch 8.2.0776: libvterm code lags behind the upstream version
Problem: Libvterm code lags behind the upstream version.
Solution: Include revision 719.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 17 May 2020 15:00:04 +0200 |
parents | 3be01cf0a632 |
children | a4652d7ec99f |
line wrap: on
line diff
--- a/src/libvterm/src/unicode.c +++ b/src/libvterm/src/unicode.c @@ -591,8 +591,15 @@ vterm_get_special_pty_type_placeholder(v // ################################ // ### The rest added by Paul Evans +static const struct interval fullwidth[] = { +#include "fullwidth.inc" +}; + INTERNAL int vterm_unicode_width(uint32_t codepoint) { + if(bisearch(codepoint, fullwidth, sizeof(fullwidth) / sizeof(fullwidth[0]) - 1)) + return 2; + return WCWIDTH_FUNCTION(codepoint); }