mirror of
https://github.com/neovim/neovim.git
synced 2026-02-20 18:36:48 +00:00
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>