diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2026-10-12 11:34:41 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2026-10-12 12:14:42 +0800 |
| commit | 8682861a0d23bcaeb71f2bc327f13542a422f5a6 (patch) | |
| tree | 6fa529970976b58c4172a44cf250870c3de2398e /runtime/lua/vim/_ftplugin/lua.lua | |
| parent | 2f052954b746205abb45fb485e84faa399ddec43 (diff) | |
| download | rneovim-8682861a0d23bcaeb71f2bc327f13542a422f5a6.tar.gz rneovim-8682861a0d23bcaeb71f2bc327f13542a422f5a6.tar.bz2 rneovim-8682861a0d23bcaeb71f2bc327f13542a422f5a6.zip | |
vim-patch:9.2.1175: setreg() block width wrong for unprintable chars
Problem: setreg() with blockwise type computes a different width for
control characters, NUL and illegal UTF-8 bytes than a
blockwise yank does.
Solution: Use byte2cells() for ASCII bytes and count a truncated UTF-8
sequence as an illegal byte (bfredl).
This applies to:
- ASCII control chars like ^G
- truncated or invalid UTF-8 bytes, displayed as <c4>
- embedded NUL byte, displayed as ^@
The function utf_ptr2cells_len() is only used for registers, so there
should be no surprising change elsewhere.
closes: vim/vim#21477
https://github.com/vim/vim/commit/0f07525b20807e68df43274c5ebbae952b02b56f
Co-authored-by: bfredl <bjorn.linse@gmail.com>
Diffstat (limited to 'runtime/lua/vim/_ftplugin/lua.lua')
0 files changed, 0 insertions, 0 deletions