diff options
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 67e4b00705..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 + } else { byteval = utf_ptr2char(line_ptr + wp->w_cursor.col); + } int groupdepth = 0; |