Problem: Having utf16idx() rounding up is inconvenient.
Solution: Make utf16idx() round down. (Yegappan Lakshmanan, closesvim/vim#12523)
95707037af
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem:
Since TUI was moved to another process 2448816956
v:argv and v:progname don't report the original argv[0].
["/usr/bin/nvim", "--embed", ...]
Solution:
Use argv[0] instead of VV_PROGPATH in ui_client_start_server().
Fix#23953
`nvim_cmd` shows multiple errors when attempting to edit another buffer
through a command when `curbuf->b_ro_locked` is set. This PR fixes that
by removing a redundant error in `execute_cmd`.
Problem: Vim9: not enough test coverage for executing :def function.
Solution: Add a few more tests. Fix inconsistencies.
6b8c7ba062
Cherry-pick a blank line in test_listdict.vim from patch 8.2.3842.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: no type check when assigning a list range. (Naohiro Ono)
Solution: Check the member type. (closesvim/vim#8750)
89071cb6a1
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: not enough tests.
Solution: Run more existing tests for Vim9 script.
700e6b1662
Cherry-pick test_listdict.vim change from patch 8.2.3854.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: not enough tests.
Solution: Also run existing tests for Vim9 script. Make errors more
consistent.
f47c5a8e2d
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: not enough tests run with Vim9.
Solution: Run a few more tests in Vim9 script and :def function. Fix that
items(), keys() and values9) return zero for a NULL dict.
Make join() return an empty string for a NULL list. Make sort()
return an empty list for a NULL list.
ef98257593
Skip f_reverse() change for consistency with other functions.
Skip Test_null_list() and Test_null_dict() because of missing patches.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: tests are only executed for legacy script.
Solution: Run more tests also for Vim9 script. Fix uncovered problems.
5dd839ce20
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: not enough code is tested.
Solution: Use CheckLegacyAndVim9Success() in more places. Fix uncovered
problems.
63cb6567f0
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Adjust relevant Lua tests. Refactor testing logic for tv_get_string_*
functions into test_string_fn().
Note that vim_snprintf(), which is used for stringifying floats, always
calls xfree(tofree), even if tofree is NULL, so we need to expect that
in the alloc log.
Problem: Tests failing because there is no error for float to string
conversion.
Solution: Change the check for failure to check for correct result. Make
some conversions strict in Vim9 script.
3cfa5b16b0
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Substitute() accepts a number but not a float expression.
Solution: Also accept a float. (closesvim/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>
Problem: No longer get an error for string concatenation with float.
(Tsuyoshi Cho)
Solution: Only convert float for Vim9 script. (closesvim/vim#6787)
2e0866128b
Vim9script is N/A.
Required for v8.2.2949.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem:
Nvim version string typically has a "build" component
but vim.version() doesn't report it.
Solution:
Add the "build" field to vim.version().
Closes#23863
Update runtime files
10e8ff9b26
Also:
- fix a missing `<` in builtin.txt.
- edit `:function` `{name}` wording to match the change made for the docs above
by Justin in #10619.
- link to `*vimrc*` rather than `*init.vim*` in repeat.txt change (as `init.lua`
may also be used).
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Visual area not shown when using 'showbreak' and start of line is
not visible. (Jaehwang Jung)
Solution: Adjust "fromcol" for the space taken by 'showbreak'.
(closesvim/vim#12514)
f578ca2c8f
Co-authored-by: Bram Moolenaar <Bram@vim.org>