| Commit message (Collapse) | Author | Age |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Can delete a numbered function. (Naohiro Ono)
Solution: Disallow deleting a numbered function. (closes vim/vim#8760)
https://github.com/vim/vim/commit/ddfc05100a29263a682dd96bb924dfde4354a654
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Confusing error message with white space before comma in the
arguments of a function declaration.
Solution: Give a specific error message. (closes vim/vim#2235)
https://github.com/vim/vim/commit/86cdb8a4bd1abff40b5f80c3c4149b33cbaab990
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Some tests are still old style.
Solution: Convert to new style tests. (Yegappan Lakshmanan, closes vim/vim#5957)
https://github.com/vim/vim/commit/08f4157c5cabc55bcb22f04dd7c717aba40caa34
Fix missing error message when sort() compare function fails.
Cherry-pick a line in test_utf8.vim from patch 8.2.0448.
Cherry-pick builtin_function() change from patch 8.2.0595.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Crash when changing the function table while listing it.
Solution: Bail out when the function table changes. (closes vim/vim#6209)
https://github.com/vim/vim/commit/3fffa97159a427067b60c80ed4645e168cc5c4bd
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* refactor: readability-uppercase-literal-suffix
* refactor: readability-named-parameter
* refactor: bugprone-suspicious-string-compare
* refactor: google-readability-casting
* refactor: readability-redundant-control-flow
* refactor: bugprone-too-small-loop-variable
* refactor: readability-non-const-parameter
* refactor: readability-avoid-const-params-in-decls
* refactor: google-readability-todo
* refactor: readability-inconsistent-declaration-parameter-name
* refactor: bugprone-suspicious-missing-comma
* refactor: remove noisy or slow warnings
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| |
| |
| | |
Problem: Vim9: cannot list a lambda function.
Solution: Support the <lambda>9 notation, like :disassemble. (closes vim/vim#7634)
https://github.com/vim/vim/commit/b657198cb30765468451d7f68fce49b5b4000c5d
|
| |
| |
| |
| |
| |
| | |
Problem: Autocmd code is indented more than needed.
Solution: Break out sooner. (Yegappan Lakshmanan, closes vim/vim#11208)
Also in user function code.
https://github.com/vim/vim/commit/e9dcf13a3007d4f603e007e0526b0005fd026bc5
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
BREAKING CHANGE: When using a Funcref converted from a Lua function as
a method in Vim script, the result of the base expression is now passed
as the first argument instead of being ignored.
vim-patch:8.2.5117: crash when calling a Lua callback from a :def function
Problem: Crash when calling a Lua callback from a :def function. (Bohdan
Makohin)
Solution: Handle FC_CFUNC in call_user_func_check(). (closes vim/vim#10587)
https://github.com/vim/vim/commit/7d149f899d423b7bf2b90d7b11ebe3e560c462b9
|
| |
| |
| |
| |
| |
| |
| | |
substitute() (#20216)
Problem: Varargs does not work for replacement function of substitute().
Solution: Check the varargs flag of the function. (closes vim/vim#11142)
https://github.com/vim/vim/commit/48db5dafecacced4a9e42de3f92838b2d59beb4c
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#20214)
Problem: The funcexe_T struct members are not named consistently.
Solution: Prefix "fe_" to all the members.
https://github.com/vim/vim/commit/851f86b951cdd67ad9cf3149e46169d1375c8d82
Omit fe_check_type: always NULL in legacy Vim script.
|
| |
| |
| |
| |
| |
| |
| | |
Problem: ERROR_UNKNOWN clashes on some systems.
Solution: Rename ERROR_ to FCERR_. (Ola Söder, closes vim/vim#5415)
https://github.com/vim/vim/commit/ef140544f6703a7a4c0f6a15f610508ed6b09e89
Remove ERROR_BOTH which was removed from Vim in patch 7.4.1582.
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
"cfuncs" was only ever used to wrap luarefs. As vim8script is
finished and will not be developed further, support for "cfuncs"
for other usecases are not planned. This abstraction was immediately
broken anyway in order to get luarefs out of userfuncs again.
Even if a new kind of userfunc needs to be invented in the future,
likely just extending the FC_... flag union directy, instead of
invoking unnecessary heap object and c function pointer indirection,
will be a more straightforward design pattern.
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Done automatically using the following perl command:
perl -pi -0777pe 's#\n\K */\*\n(.+?)\s*\*/\n#join("\n", map { $_ =~ s:^\s*\K \*://:; $_ } split("\n", $1)) . "\n"#sge' src/nvim/**/*.c
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Insufficient testing for exception handling and the "attention"
prompt.
Solution: Add test cases. (Yegappan Lakshmanan, closes vim/vim#5681)
https://github.com/vim/vim/commit/b654103ad1e379348616f354272db86804ab4bdb
Fix memory leak from last char_u refactor.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`!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.
|
| |
| |
| |
| |
| |
| |
| | |
* refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| | |
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Several errors are not tested for.
Solution: Add tests. (Yegappan Lakshmanan, closes vim/vim#5892)
https://github.com/vim/vim/commit/ee4e0c1e9a81cb5d96e0060203a9033c2f28588e
Omit Test_range() change: reverted in patch 8.2.0615.
Cherry-pick Test_z_no_space_before_xxx() from patch 8.2.0195.
Cherry-pick Test_reverse_sort_uniq() change from patch 8.2.0183.
Make uniq() error behavior consistent with sort().
Cherry-pick Test_set_ttytype() change from patch 8.1.1826.
Cherry-pick quickfix checks from patch 8.1.2373 to test_preview.vim.
Test_viminfo_error() is applicable.
Cherry-pick E1058 from patch 8.2.0149 and port Test_deep_nest() to Lua.
|
|/
|
|
|
|
| |
A user function can clobber the repeat_cmdline, which is used to build
the redo buffer, thus, if the redo buffer is saved when calling a
userfunc, so should the repeat_cmdline.
|
|
|
| |
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
|
|
|
|
|
|
|
|
| |
Problem: Vim9: script reload test is disabled.
Solution: Compile a function in the context of the script where it was
defined. Set execution stack for compiled function. Add a test
that an error is reported for the right file/function.
https://github.com/vim/vim/commit/25e0f5863e9010a75a1ff0d04e8f886403968755
Omit stack_top_is_ufunc(): only used by Vim9 script.
|
|
|
|
|
|
| |
Problem: Expanding <sfile> works differently the second time.
Solution: Keep the expanded name when redefining a function. (closes vim/vim#5425)
https://github.com/vim/vim/commit/b9adef79eca6f95bc7376ff3a6a383e436c5d6ea
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Execution stack is incomplete and inefficient.
Solution: Introduce a proper execution stack and use it instead of
sourcing_name/sourcing_lnum. Create a string only when used.
https://github.com/vim/vim/commit/1a47ae32cdc19b0fd5a82e19fe5fddf45db1a506
Omit test_debugger.vim: superseded by later patches.
Omit check_map_keycodes(): N/A.
Omit kword_test.c: N/A (converted to a unit test).
|
|
|
|
| |
Mostly avoids including eval.h, ex_cmds2.h and ex_docmd.h in other
headers.
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
This avoids including ex_eval.h in any other header, thus preventing
future circular includes.
|
|
|
|
|
|
|
| |
Problem: Profiling code is spread out.
Solution: Move more profiling code to profiler.c. (Yegappan Lakshmanan,
closes vim/vim#4668)
https://github.com/vim/vim/commit/660a10ad41c14363326f83451c3c425201923119
|
|
|
|
|
|
|
|
|
| |
Problem: Profiling functionality is spread out.
Solution: Put profiling functionality in profiling.c. (Yegappan Lakshmanan,
closes vim/vim#4666)
https://github.com/vim/vim/commit/fa55cfc69d2b14761e2a8bd85bc1e0d82df770aa
Move proftime_T to types.h for now to avoid recursive #include.
|
|
|
|
|
|
|
| |
vim-patch:8.2.0559: clearing a struct is verbose
Problem: Clearing a struct is verbose.
Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER().
https://github.com/vim/vim/commit/a80faa8930ed5a554beeb2727762538873135e83
|
|
|
|
|
|
| |
Problem: The "trailing characters" error can be hard to understand.
Solution: Add the trailing characters to the message.
https://github.com/vim/vim/commit/2d06bfde29bd3a62fc85823d2aa719ef943bd319
|
|
|
|
| |
The last commit didn't actually disable V1028 because of a typo.
Fix the typo so it is actually disabled.
|
|
|
|
|
| |
This type itself is not eval-specific. Moving it to types.h can avoid
including eval/funcs.h in many headers, and types.h is already included
by many headers.
|
|
|
|
|
|
|
|
| |
Problem: The eval.c file is too big.
Solution: Move code related to variables to evalvars.c. (Yegappan
Lakshmanan, closes vim/vim#4868)
https://github.com/vim/vim/commit/0522ba0359c96a8c2a4fc8fca0d3b58e49dda759
Name the new file eval/vars.c instead.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: File for Insert mode is much too big.
Solution: Split off the code for Insert completion. (Yegappan Lakshmanan,
closes vim/vim#4044)
https://github.com/vim/vim/commit/7591bb39d58ece38a5fef984a08ea9012616c1f9
Cherry-pick ins_compl_len() -> get_compl_len() from patch 8.2.4001.
Revert a71c5e9eb98fbb2ca88510269935cdcda37369fc: ctrl_x_mode is no
longer a global variable, so l_ctrl_x_mode is no longer needed.
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
| |
|
|
|
|
|
|
|
|
|
|
| |
register_cfunc allocates a ufunc_T, but doesn't store the pointer
anywhere before returning. The uf_name member variable is stored in a
hashtable and used to lookup the ufunc_T later, but that's too much for
Coverity to track.
Adding the annotation ensures that any new callers to register_cfunc
don't pop up as new "leaks" in the Coverity scans.
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|