Commit Graph

5 Commits

Author SHA1 Message Date
zeertzjq
c70e8ef9b7 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

110656ba60

Co-authored-by: John Marriott <basilisk@internode.on.net>
2025-10-30 22:01:58 +08:00
Jan Edmund Lazo
24675ffa97 vim-patch:8.2.3968: build failure
Problem:    Build failure.
Solution:   Add missing changes.

e70cec9760

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-10-12 23:33:20 -04:00
Jan Edmund Lazo
b6d0c391fc vim-patch:8.2.4878: valgrind warning for using uninitialized variable
Problem:    Valgrind warning for using uninitialized variable.
Solution:   Initialize the type of newtv.

dd7eff0a75

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-10-11 10:41:53 -04:00
Jan Edmund Lazo
3051e8bbb1 vim-patch:8.1.1981: the evalfunc.c file is too big
Problem:    The evalfunc.c file is too big.
Solution:   Move undo functions to undo.c.  Move cmdline functions to
            ex_getln.c.  Move some container functions to list.c.

08c308aeb5

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-10-06 20:56:38 -04:00
Jan Edmund Lazo
ed0f46af62 vim-patch:8.1.1978: the eval.c file is too big
Problem:    The eval.c file is too big.
Solution:   Move filter() and map() to list.c.

1e1d30048e

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-10-06 20:56:38 -04:00