Commit Graph

5 Commits

Author SHA1 Message Date
Sean Dewar
7f8c1e53a6 vim-patch:8.2.2948: substitute() accepts a number but not a float expression
Problem:    Substitute() accepts a number but not a float expression.
Solution:   Also accept a float. (closes vim/vim#8331)

7a2217bedd

Vim9script is N/A. No need to port the strict argument and
tv_get_string_buf_chk_strict(), as it's only used for Vim9script.

Like the patch, use vim_snprintf over snprintf, as the "%g" specifier in
snprintf removes the ".0" from integer floats.

This means similiar to numbers, floats are (mostly) convertable to
strings.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-06-12 13:27:07 +08:00
zeertzjq
3c4890d1ef
test(old): reorder test_substitute.vim to match upstream (#23994) 2023-06-12 11:44:01 +08:00
zeertzjq
227f06b7df
vim-patch:9.0.1145: invalid memory access with recursive substitute expression (#23132)
Problem:    Invalid memory access with recursive substitute expression.
Solution:   Check the return value of vim_regsub().

3ac1d97a1d

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-16 18:43:15 +08:00
zeertzjq
b28683d252
vim-patch:9.0.0947: invalid memory access in substitute with function (#23126)
Problem:    Invalid memory access in substitute with function that goes to
            another file.
Solution:   Check for text locked in CTRL-W gf.

cc762a48d4

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-16 17:44:14 +08:00
dundargoc
af23d17388
test: move oldtests to test directory (#22536)
The new oldtest directory is in test/old/testdir. The reason for this is
that many tests have hardcoded the parent directory name to be
'testdir'.
2023-03-07 11:13:04 +08:00