Problem: Strange error for assigning to "x.key" on non-dictionary.
Solution: Add a specific error message. (closesvim/vim#8451)
3a3b10e87a
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Still a way to shadow a builtin function. (Yasuhiro Matsumoto)
Solution: Check the key when using extend(). (issue vim/vim#8302)
6f1d2aa437
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Builtin function can be shadowed by global variable.
Solution: Check for builtin function before variable. (Yasuhiro Matsumoto,
closesvim/vim#8302)
3d9c4eefe6
Cherry-pick Test_gettext() from patch 8.2.2886.
Problem: Confusing error when expression is followed by comma.
Solution: Give a different error for trailing text. (closesvim/vim#8395)
fae55a9cb0
Omit test_eval_stuff.vim and test_viminfo.vim: changes tests are N/A.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: crash when using LHS with double index.
Solution: Handle lhs_dest which is "dest_expr". (closesvim/vim#8068)
Fix confusing error message for missing dict item.
b9c0cd897a
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Checking for first character of dict key is inconsistent.
Solution: Add eval_isdictc(). (closesvim/vim#6546)
b13ab99908
Omit handle_subscript() change: only affects Vim9 script.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: no error for missing white space in assignment at script
level.
Solution: Check for white space. (closesvim/vim#6495)
63be3d4ba0
Cherry-pick Test_let_errors() change from patch 8.2.0633.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: wrong argument for append() results in two errors.
Solution: Check did_emsg. Also for setline(). Adjust the help for
appendbufline().
8b6256f6ec
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: assert_fails() checks the last error message.
Solution: Check the first error, it is more relevant. Fix all the tests
that rely on the old behavior.
9b7bf9e98f
Skip test_listener.vim, test_textprop.vim, test_viminfo.vim.
Skip test_python2.vim: affected line fails and hasn't been ported.
Skip test_python3.vim: affected lines fail and haven't been ported.
Skip CHECK_LIST_MATERIALIZE.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Regexp benchmark stest is old style.
Solution: Make it a new style test. Fix using a NULL list. Add more tests.
(Yegappan Lakshmanan, closesvim/vim#5963)
ad48e6c159
N/A patches:
vim-patch:9.0.0829: wrong counts in macro comment
Problem: Vim9: no error if declaring a funcref with a lower case letter.
Solution: Check the name after the type is inferred. Fix confusing name.
98b4f145eb
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: map() returing zero for NULL list is unexpected.
Solution: Return the empty list. (closesvim/vim#7133)
ffdf8adfa8
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Null dict is not handled like an empty dict.
Solution: Fix the code and add tests. (Yegappan Lakshmanan, closesvim/vim#5968)
ea04a6e8ba
Nvim doesn't support modifying NULL list, so comment out a line.
Problem: Wrong column when calling setcursorcharpos() with zero lnum.
Solution: Set the line number before calling buf_charidx_to_byteidx().
(closesvim/vim#11329)
79f234499b
Replaces unnecessary helper functions in `optionstr.c` such as
`get_option_flags()`, `get_option_fullname()`, `set_option_flag()`,
`is_global_option()`, etc. with a single `get_option()` helper function
that allows direct access to the `options` array.
Also refactors `f_exists()` to use `get_varp_scope` instead of using
`get_option_tv`. This opens up the path for removing `getoptions_T`
altogether later down the line since the hidden option logic is no
longer needed.
Problem: The funcexe_T struct members are not named consistently.
Solution: Prefix "fe_" to all the members.
851f86b951
Omit fe_check_type: always NULL in legacy Vim script.
`!did_throw` doesn't exactly imply `!current_exception`, as `did_throw = false`
is sometimes used to defer exception handling for later (without forgetting the
exception). E.g: uncaught exception handling in `do_cmdline()` may be deferred
to a different call (e.g: when `try_level > 0`).
In #7881, `current_exception = NULL` in `do_cmdline()` is used as an analogue of
`did_throw = false`, but also causes the pending exception to be lost, which
also leaks as `discard_exception()` wasn't used.
It may be possible to fix this by saving/restoring `current_exception`, but
handling all of `did_throw`'s edge cases seems messier. Maybe not worth
diverging over.
This fix also uncovers a `man_spec.lua` bug on Windows: exceptions are thrown
due to Windows missing `man`, but they're lost; skip these tests if `man` isn't
executable.
In non-multigrid UI the only change is that the returned height now
excludes winbar, and this is compatible with Vim.
In multigrid UI this means the return value of these functions now
reflect the space available for buffer lines in a window.
No change in nvim_win_get_height() and nvim_win_get_width().
Problem: Vim9: 'cpo' can become empty.
Solution: Use empty_option instead of an empty string. Update quickfix
buffer after restoring 'cpo'. (closesvim/vim#7608)
e5a2dc87fd
Omit test as it is Vim9 script.