aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-08-08 01:24:18 +0200
committerGitHub <noreply@github.com>2018-08-08 01:24:18 +0200
commitc06613d2f6c3f3a864c43e03b95d12efb3e0f4a6 (patch)
tree3d052800def8498c4d26887b881f99e40bb38a46 /src/nvim/buffer.c
parent1593ee7cf21f77168531c959fa9e73933b502d2e (diff)
parent5cecd7a93aba83cd477519974fc33fadbdcfdc87 (diff)
downloadrneovim-c06613d2f6c3f3a864c43e03b95d12efb3e0f4a6.tar.gz
rneovim-c06613d2f6c3f3a864c43e03b95d12efb3e0f4a6.tar.bz2
rneovim-c06613d2f6c3f3a864c43e03b95d12efb3e0f4a6.zip
Merge #8665 'Remove mb_ptr2char macro'
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index 3020c29709..71e04ec0fb 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -3220,10 +3220,11 @@ int build_stl_str_hl(
// Get the byte value now, in case we need it below. This is more
// efficient than making a copy of the line.
int byteval;
- if (wp->w_cursor.col > (colnr_T)STRLEN(line_ptr))
+ if (wp->w_cursor.col > (colnr_T)STRLEN(line_ptr)) {
byteval = 0;
- else
- byteval = (*mb_ptr2char)(line_ptr + wp->w_cursor.col);
+ } else {
+ byteval = utf_ptr2char(line_ptr + wp->w_cursor.col);
+ }
int groupdepth = 0;