diff options
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index a8d29a3a53..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; @@ -3603,7 +3604,7 @@ int build_stl_str_hl( // Store the current buffer number as a string variable vim_snprintf((char *)tmp, sizeof(tmp), "%d", curbuf->b_fnum); - set_internal_string_var((char_u *)"actual_curbuf", tmp); + set_internal_string_var((char_u *)"g:actual_curbuf", tmp); buf_T *o_curbuf = curbuf; win_T *o_curwin = curwin; |