aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/treesitter/_meta/misc.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-03-29 20:12:12 +0800
committerzeertzjq <zeertzjq@outlook.com>2025-03-29 21:12:32 +0800
commit52b19e012474c19601a491bf0a0ab6ba15cfae8d (patch)
treec9e15d4c47449f3dd661bb92cf379af9d3797f83 /runtime/lua/vim/treesitter/_meta/misc.lua
parent686e7aca40b850789af45ec9a97905518654b49e (diff)
downloadrneovim-52b19e012474c19601a491bf0a0ab6ba15cfae8d.tar.gz
rneovim-52b19e012474c19601a491bf0a0ab6ba15cfae8d.tar.bz2
rneovim-52b19e012474c19601a491bf0a0ab6ba15cfae8d.zip
vim-patch:9.1.1257: Mixing vim_strsize() with mb_ptr2cells() in pum_redraw()
Problem: Mixing vim_strsize() with mb_ptr2cells() in pum_redraw(). Solution: Change vim_strsize() to mb_string2cells() (zeertzjq). Since vim_strsize() uses ptr2cells() for the cell width of each char, it is strange to mix it with mb_ptr2cells(), which is used both just below and in pum_screen_puts_with_attr(), and screen_puts_len() also uses something similar. Meanwhile mb_string2cells() uses mb_ptr2cells() for the cell width of each char. Note that the vim_strsize() and mb_string2cells() actually return the same value here, as the transstr() above makes sure the string only contains printable chars, and ptr2cells() and mb_ptr2cells() only return different values for unprintable chars. closes: vim/vim#17003 https://github.com/vim/vim/commit/90e52490b39f0052fb5313d67728eff77191aaae
Diffstat (limited to 'runtime/lua/vim/treesitter/_meta/misc.lua')
0 files changed, 0 insertions, 0 deletions