Problem: Cannot use an import in 'formatexpr'.
Solution: Set the script context when evaluating 'formatexpr'.
3ba685eeef
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: cannot use an import in 'diffexpr'.
Solution: Set the script context when evaluating 'diffexpr'. Do not require
'diffexpr' to return a bool, it was ignored anyway.
7b29f6a394
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: 'balloonexpr' is evaluated in the current script context.
Solution: Use the script context where the option was set.
5600a709f4
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: 'foldtext' is evaluated in the current script context.
Solution: Use the script context where the option was set.
9530b580a7
Script version is N/A.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: find_file_in_path() is not reentrant.
Solution: Instead of global variables pass pointers to the functions.
(closesvim/vim#12093)
5145c9a829
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: The :defer command does not check the function argument count and
types.
Solution: Check the function arguments when adding a deferred function.
169003289f
Cherry-pick check_internal_func() from Vim, but use EvalFuncDef pointer
as first argument.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Deferred functions not invoked when partial func exits.
Solution: Create a funccall_T when calling a :def function.
9667b2c888
The remove_funccal() function is currently unused, but it will be used
in patch 9.0.0618.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: number of arguments is not always checked. (Yegappan
Lakshmanan)
Solution: Check number of arguments when calling function by name.
5082471f91
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Invalid memory access with bad 'statusline' value.
Solution: Avoid going over the NUL at the end.
7b17eb4b06
Co-authored-by: Bram Moolenaar <Bram@vim.org>
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>
shell_error is a function, the code missed parentheses
The actual module for perl module version is App::cpanminus::script, not
App::cpanminus::fatscript.
Problem: Vim9: exception in ISN_INSTR caught at wrong level.
Solution: Set the starting trylevel in exec_instructions(). (closesvim/vim#8214)
ff65288aa8
Co-authored-by: Bram Moolenaar <Bram@vim.org>
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>
Problem: C++ 20 modules are not recognized.
Solution: Add patterns to recognize C++ 20 modules as "cpp". (Ben Jackson,
closesvim/vim#12261)
732d69e191
Co-authored-by: Ben Jackson <puremourning@gmail.com>
Problem: Members of funccall_T are inconsistently named.
Solution: Use the "fc_" prefix for all members.
ca16c60f33
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Code for making 'shortmess' temporarily empty is repeated.
Solution: Add functions for making 'shortmess' empty and restoring it.
(Christian Brabandt, closesvim/vim#11709)
9aee8ec400
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: Only created files can be cleaned up with one call.
Solution: Add flags to mkdir() to delete with a deferred function.
Expand the writefile() name to a full path to handle changing
directory.
6f14da15ac
vim-patch:8.2.3742: dec mouse test fails without gnome terminfo entry
Problem: Dec mouse test fails without gnome terminfo entry.
Solution: Check if there is a gnome entry. Also fix 'acd' test on
MS-Windows. (Dominique Pellé, closesvim/vim#9282)
f589fd3e10
Cherry-pick test_autochdir.vim changes from patch 9.0.0313.
Cherry-pick test_autocmd.vim changes from patch 9.0.0323.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: :defer not tested with exceptions and ":qa!".
Solution: Test :defer works when exceptions are thrown and when ":qa!" is
used. Invoke the deferred calls on exit.
58779858fb
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Cannot use a partial with :defer.
Solution: Add the partial arguments before the other arguments. Disallow
using a dictionary.
86d87256c4
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Cleaning up after writefile() is a hassle.
Solution: Add the 'D' flag to defer deleting the written file. Very useful
in tests.
806a273f3c
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Cleaning up afterwards can make a function messy.
Solution: Add the :defer command.
1d84f7608f
Omit EX_EXPR_ARG: Vim9 script only.
Make :def throw E319 to avoid confusing behavior.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Test fails because of using Vim9 syntax in legacy function.
Solution: Add "call".
4f16e9de98
Add test_nested_function.vim changes from patches 8.{0.0141,2.1432}.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Confusing error for using a variable as a function.
Solution: If a function is not found but there is a variable, give a more
useful error. (issue vim/vim#9310)
2ef9156b42
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Crash when using a null function reference. (Naohiro Ono)
Solution: Check for an invalid function name. (closesvim/vim#8367)
22db0d549f
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Crash when passing NULL function to reduce().
Solution: Check for NULL pointer and give an error. (Dominique Pellé,
closesvim/vim#7243)
0d90e728fe
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Memory allocation failure not tested when defining a function.
Solution: Add a test. (Yegappan Lakshmanan, closesvim/vim#10127)
7c7e19cf50
test_alloc_fail() is N/A.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
- Remove unused function argument from GetBinaryDeps
- Remove unused variable LUA_LOAD_PACKAGE_MODULE_SOURCE
- Add LUA_FS_MODULE_SOURCE as a dependency of VIM_MODULE_FILE
Problem: getscriptinfo() loops even when specific SID is given.
Solution: Only loop when needed. Give a clearer error message.
(closesvim/vim#12207)
2d68b722e3
Problem: It is not easy to get information about a script.
Solution: Make getscriptinf() return the version. When selecting a specific
script return functions and variables. (Yegappan Lakshmanan,
closesvim/vim#10991)
2f892d8663
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: getscriptinfo() does not include the version. Cannot select
entries by script name.
Solution: Add the "version" item and the "name" argument. (Yegappan
Lakshmanan, closesvim/vim#10962)
520f6ef60a
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>