]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.1169: using global variable for get_insert()/get_lambda_name() v9.1.1169
authorYee Cheng Chin <ychin.git@gmail.com>
Mon, 3 Mar 2025 19:12:05 +0000 (20:12 +0100)
committerChristian Brabandt <cb@256bit.org>
Mon, 3 Mar 2025 19:12:05 +0000 (20:12 +0100)
commit0b5fe420715786249cd121d845dbd6a81f962d1b
treedb6aeffbf681565a1ef659f3a25325713bd450f4
parentd2219d547d2e70ba7af498866b0d12d3b6517b16
patch 9.1.1169: using global variable for get_insert()/get_lambda_name()

Problem:  using global variable for get_insert()/get_lambda_name()
          (after v9.1.1151)
Solution: let the functions return a string_T object instead
          (Yee Cheng Chin)

In #16720, `get_insert()` was modified to store a string length in a
global variable to be queried immediately by another `get_insert_len()`
function, which is somewhat fragile. Instead, just have the function
itself return a `string_T` object instead. Also do the same for
`get_lambda_name()` which has similar issues.

closes: #16775

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/edit.c
src/getchar.c
src/proto/getchar.pro
src/proto/userfunc.pro
src/userfunc.c
src/version.c
src/vim9compile.c