mirror of
https://github.com/neovim/neovim.git
synced 2026-03-02 07:08:27 +00:00
Problem: setreg() doesn't correctly handle mbyte chars in blockwise
mode
Solution: use mb_ptr2len_len function pointer (Yee Cheng Chin)
setreg() will automatically calculate the width when a blockwise mode is
specified, but it does not properly calculate the line widths of mbyte
characters when value is passed as newline-terminated string. It does
work when value is passed as a list of lines though.
Fix this by properly using the mbyte function pointer to increment the
loop counter.
closes: vim/vim#16596
a17f8bfb28
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>