Problem: crypt tests hang and cause memory errors
Solution: Move variable to start of function.
438d0c5e58
N/A patches for version.c:
vim-patch:9.0.1639: build failure without the crypt feature
Problem: Build failure without the crypt feature.
Solution: Adjust #ifdefs
bc385a150f
vim-patch:9.0.1640: compiler warning for unused variables without crypt feature
Problem: Compiler warning for unused variables without the crypt feature.
Solution: Adjust #ifdefs
7f29122c8c
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Previously, filtering code actions with the "only" option failed
if the code action kind contained special Lua pattern chars such as "-"
(e.g. the ocaml language server supports a "type-annotate" code action).
Solution: use string comparison instead of string.find
Problem: Compiler warning for uninitialized variable.
Solution: Move the variable to an inner block and initialize it. (Christian
Brabandt, closesvim/vim#12549)
54f50cbf6a
The "eof" variable is not present in Nvim because it is only used by
FEAT_CRYPT.
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: Error message is cleared when removing mode message.
Solution: Also reset flags when the message is further down.
da51ad51bf
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Message is cleared when removing mode message (Gary Johnson).
Solution: Do not clear the command line after displaying a message.
800cdbb7ca
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Expanding a pattern interferes with command line completion.
Solution: Set the file index only when appropriate. (closesvim/vim#12519)
094dd152fe
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