diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2025-10-30 21:31:27 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2025-10-30 22:01:58 +0800 |
| commit | c70e8ef9b7fcfefcfb47f95af4589b91d042108a (patch) | |
| tree | 4b48f2e8be68ac613ff3d5edba1b95e0820a2b74 /runtime/lua/vim/_stringbuffer.lua | |
| parent | f3b38b46ebbe34f5a56ca166da9cdb27d4827724 (diff) | |
| download | rneovim-c70e8ef9b7fcfefcfb47f95af4589b91d042108a.tar.gz rneovim-c70e8ef9b7fcfefcfb47f95af4589b91d042108a.tar.bz2 rneovim-c70e8ef9b7fcfefcfb47f95af4589b91d042108a.zip | |
vim-patch:partial:9.1.1887: string handling in strings.c can be improved
Problem: string handling in strings.c can be improved
Solution: Refactor strings.c and remove calls to STRLEN()
(John Marriott)
This change does:
- In vim_strsave_shellescape() a small cosmetic change.
- In string_count() move the call to STRLEN() outside the while loop.
- In blob_from_string() refactor to remove call to STRLEN().
- In string_from_blob() call vim_strnsave() instead of vim_strsave().
- In vim_snprintf_safelen() call vim_vsnprintf_typval() directly instead
of vim_vsnprintf() which then calls vim_vsnprintf_typval().
- In copy_first_char_to_tv() change to return -1 on failure or the length
of resulting v_string. Change string_filter_map() and string_reduce() to
use the return value of copy_first_char_to_tv().
closes: vim/vim#18617
https://github.com/vim/vim/commit/110656ba607d22bbd6b1b25f0c05a1f7bad205c0
Co-authored-by: John Marriott <basilisk@internode.on.net>
Diffstat (limited to 'runtime/lua/vim/_stringbuffer.lua')
0 files changed, 0 insertions, 0 deletions