diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-09-01 19:46:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-01 19:46:46 +0200 |
commit | f62d4865d88de0bd60218ecb3e08d9f3c772e12e (patch) | |
tree | 54bd16926bb85b51273e6dce61f4d85c45e01839 /src/nvim/hardcopy.c | |
parent | 064495a53ace225626289e7143b5520b38e3f5fc (diff) | |
parent | a3549286b24000dcdd4411bd5faf637e1c9a0d3d (diff) | |
download | rneovim-f62d4865d88de0bd60218ecb3e08d9f3c772e12e.tar.gz rneovim-f62d4865d88de0bd60218ecb3e08d9f3c772e12e.tar.bz2 rneovim-f62d4865d88de0bd60218ecb3e08d9f3c772e12e.zip |
Merge #8934 'Remove mb_ptr2len_len, mb_ptr2cells, mb_ptr2cells_len'
Diffstat (limited to 'src/nvim/hardcopy.c')
-rw-r--r-- | src/nvim/hardcopy.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/nvim/hardcopy.c b/src/nvim/hardcopy.c index a2f48f46aa..a8731d5bd7 100644 --- a/src/nvim/hardcopy.c +++ b/src/nvim/hardcopy.c @@ -892,10 +892,7 @@ static colnr_T hardcopy_line(prt_settings_T *psettings, int page_line, prt_pos_T need_break = 1; } else { need_break = mch_print_text_out(line + col, (size_t)outputlen); - if (has_mbyte) - print_pos += (*mb_ptr2cells)(line + col); - else - print_pos++; + print_pos += utf_ptr2cells(line + col); } } @@ -2912,7 +2909,7 @@ int mch_print_text_out(char_u *const textp, size_t len) } } if (prt_out_mbyte) { - const bool half_width = ((*mb_ptr2cells)(p) == 1); + const bool half_width = (utf_ptr2cells(p) == 1); if (half_width) { char_width /= 2; } |