| Commit message (Collapse) | Author | Age |
|\ |
|
| | |
|
| |\ |
|
| |\ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Remove `export` pramgas from defs headers as it causes IWYU to believe
that the definitions from the defs headers comes from main header, which
is not what we really want.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Specifically, specify that each initialization should be done on a
separate line.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem: Set_ref_in_list() only sets ref in items.
Solution: Rename to set_ref_in_list_items() to avoid confusion.
https://github.com/vim/vim/commit/7be3ab25891fec711d8a2d9d242711a9155852b6
Omit set_ref_in_list() and set_ref_in_dict(): only used in popup window,
if_pyth and if_lua.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |_|/
|/| |
| | |
| | |
| | |
| | | |
FUNC_ATTR_* should only be used in .c files with generated headers.
Defining FUNC_ATTR_* as empty in headers causes misuses of them to be
silently ignored. Instead don't define them by default, and only define
them as empty after a .c file has included its generated header.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
It is less intrusive to silence the warning with a comment instead of a
macro if needed.
|
| | |
| | |
| | |
| | |
| | |
| | | |
This requires removing the "Inner expression should be aligned" rule
from clint as it prevents essentially any formatting regarding ternary
operators.
|
| | |
| | |
| | |
| | |
| | | |
- reduce variable scope
- prefer initialization over declaration and assignment
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We already have an extensive suite of static analysis tools we use,
which causes a fair bit of redundancy as we get duplicate warnings. PVS
is also prone to give false warnings which creates a lot of work to
identify and disable.
|
| | | |
|
| | |
| | |
| | |
| | | |
When the given length is exactly the number of bytes to copy, xmemdupz()
makes the intention clearer.
|
| | |
| | |
| | |
| | |
| | |
| | | |
long is 32 bits on windows, while it is 64 bits on other architectures.
This makes the type suboptimal for a codebase meant to be
cross-platform. Replace it with more appropriate integer types.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
(#25715)
Problem: Vim9: crash with deferred function call and exception
Solution: Save and restore exception state
Crash when a deferred function is called after an exception and another
exception is thrown
closes: vim/vim#13376
closes: vim/vim#13377
https://github.com/vim/vim/commit/c59c1e0d88651a71ece7366e418f1253abbe2a28
The change in check_due_timer() is N/A as Nvim calls timer callbacks on
the main loop.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Vim9: exceptions confuse defered functions
Solution: save and restore exception state when calling defered
functions
closes: vim/vim#13364
closes: vim/vim#13372
https://github.com/vim/vim/commit/0672595fd50e9ae668676a40e28ebf66d7f52392
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem:
The swapfile "E325: ATTENTION" dialog is displayed when editing a file
already open in another (running) Nvim. Usually this behavior is
annoying and irrelevant:
- "Recover" and the other options ("Open readonly", "Quit", "Abort") are
almost never wanted.
- swapfiles are less relevant for "multi-Nvim" since 'autoread' is
enabled by default.
- Even less relevant if user enables 'autowrite'.
Solution:
Define a default SwapExists handler which does the following:
1. If the swapfile is owned by a running Nvim process, automatically
chooses "(E)dit anyway" (caveat: this creates a new, extra swapfile,
which is mostly harmless and ignored except by `:recover` or `nvim -r`.
2. Shows a 1-line "ignoring swapfile..." message.
3. Users can disable the default SwapExists handler via `autocmd! nvim_swapfile`.
|
| | |
| | |
| | |
| | |
| | |
| | | |
long is 32 bits on windows, while it is 64 bits on other architectures.
This makes the type suboptimal for a codebase meant to be
cross-platform. Replace it with more appropriate integer types.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
- Move vimoption_T to option.h
- option_defs.h is for option-related types
- option_vars.h corresponds to Vim's option.h
- option_defs.h and option_vars.h don't include each other
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Clang 14 now reports sprintf as deprecated.
|
| | |
| | |
| | |
| | |
| | | |
Replace usage of STR{CPY,CAT} with xstrl{cpy,cat} when using on IObuff
Co-authored-by: ii14 <ii14@users.noreply.github.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Test failures.
Solution: Change check for NULL pointer.
https://github.com/vim/vim/commit/78a70533c3707aa50cbf998c7807221945aa9787
:export is N/A.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Coverity warns for using NULL pointer.
Solution: Bail out when running out of memory. Check for running over end of
a string.
https://github.com/vim/vim/commit/54598066ca4cfaf0761aedf47e4ba9844674791e
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Inconsistent capitalization of error messages.
Solution: Always start with a capital.
https://github.com/vim/vim/commit/7707228aace9aff16434edf5377a354c6ad07316
Most of these errors are Vim9 script only.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Error when heredoc content looks like heredoc.
Solution: Handle curly expressions. (closes vim/vim#12325)
https://github.com/vim/vim/commit/a93d9cdc74f70ca2c85781496ffae4ca738fcd88
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Heredoc for interfaces does not support "trim".
Solution: Update the script heredoc support to be same as the :let command.
(Yegappan Lakshmanan, closes vim/vim#5916)
https://github.com/vim/vim/commit/6c2b7b8055b96463f78abb70f58c4c6d6d4b9d55
|
| | |
| | |
| | |
| | | |
Notable changes: replace all infinite loops to `while(true)` and remove
`int` from `unsigned int`.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
(#23314)
Problem: Using freed memory when executing delfunc at the more prompt.
Solution: Check function list not changed in another place. (closes vim/vim#11437)
https://github.com/vim/vim/commit/398a26f7fcd58fbc6e2329f892edbb7479a971bb
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In file included from /usr/include/string.h:535,
from gsrc/nvim/eval/userfunc.c:11:
In function ‘strcpy’,
inlined from ‘cat_func_name’ at gsrc/nvim/eval/userfunc.c:662:5,
inlined from ‘get_user_func_name’ at gsrc/nvim/eval/userfunc.c:2854:5:
/usr/include/bits/string_fortified.h:79:10: warning: ‘__builtin___strcpy_chk’ offset 0 from the object at ‘<unknown>’ is out of the bounds of referenced subobject ‘uf_name’ with ty
pe ‘char[]’ at offset 0 [-Warray-bounds=]
79 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from gsrc/nvim/eval/typval.h:10,
from gsrc/nvim/buffer_defs.h:20,
from gsrc/nvim/autocmd.h:8,
from gsrc/nvim/eval/userfunc.c:15:
gsrc/nvim/eval/typval_defs.h: In function ‘get_user_func_name’:
gsrc/nvim/eval/typval_defs.h:342:8: note: subobject ‘uf_name’ declared here
342 | char uf_name[]; ///< Name of function (actual size equals name);
| ^~~~~~~
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Deferred functions invoked in unexpected order when using :qa and
autocommands.
Solution: Call deferred functions for the current funccal before using the
stack. (closes vim/vim#12278)
https://github.com/vim/vim/commit/1be4b81bfb3d7edf0e2ae41711d429e8fa5e0555
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Deferred functions not called from autocommands.
Solution: Also go through the funccal_stack. (closes vim/vim#12267)
https://github.com/vim/vim/commit/960cf9119e3f4922ca9719feb5e0c0bc5e3b9840
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Recursively calling :defer function if it does :qa.
Solution: Clear the defer entry before calling the function. (closes vim/vim#12266)
https://github.com/vim/vim/commit/42994bf678f46dc9ca66e49f512261da8864fff6
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Crash when using "!!" without a previous shell command.
Solution: Check "prevcmd" is not NULL. (closes vim/vim#11487)
https://github.com/vim/vim/commit/6600447c7b0a1be3a64d07a318bacdfaae0cac4b
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.
https://github.com/vim/vim/commit/169003289fb4b2ad18fd7f5807e0d05efff0be85
Cherry-pick check_internal_func() from Vim, but use EvalFuncDef pointer
as first argument.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|