mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 08:18:17 +00:00
fix(ui): fix multi-byte characters highlight in virtual text
This also fixes insert cursor position around virtual text
vim-patch:9.0.0132: multi-byte characters in virtual text not handled correctly
Problem: Multi-byte characters in virtual text not handled correctly.
Solution: Count screen cells instead of bytes.
09ff4b54fb
This commit is contained in:
@@ -1824,7 +1824,7 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool nochange,
|
||||
wlv.c_extra = NUL;
|
||||
wlv.c_final = NUL;
|
||||
wlv.extra_attr = vtc.hl_id ? syn_id2attr(vtc.hl_id) : 0;
|
||||
n_attr = wlv.n_extra;
|
||||
n_attr = mb_charlen(vtc.text);
|
||||
extmark_attr = 0;
|
||||
virt_inline_i++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user