The earlier vsnprintf() call checks whether str->items is NULL, sets of
the "possible NULL" spidey sense. kv_ensure_space() guarantees
str->items is non-NULL but since it doesn't use NULL checks to decide
whether to alloc, static analyzers can't tell this code path is safe.
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.
Coverity was reporting false positives, particularly around for non-NUL
terminated strings around uses of xmemdupz(). The updated model
ensures Coverity understands xmemdupz allocates an extra byte and sets it
to NUL as well as the main details of our other allocation related
wrappers.
Problem: When 'shortmess' contains 'A' loading a session may still warn for
an existing swap file. (Melker Österberg)
Solution: Keep the 'A' flag to 'shortmess' in the session file.
(closesvim/vim#10443)
aaadb5b6f7
Use readfile() with "B" flag in test as readblob() needs patch 8.2.2343.
The current approach of using `on_attach` callbacks for configuring
buffers for LSP is suboptimal:
1. It does not use the standard Nvim interface for driving and hooking
into events (i.e. autocommands)
2. There is no way for "third parties" (e.g. plugins) to hook into the
event. This means that *all* buffer configuration must go into the
user-supplied on_attach callback. This also makes it impossible for
these configurations to be modular, since it all must happen in the
same place.
3. There is currently no way to do something when a client detaches from
a buffer (there is no `on_detach` callback).
The solution is to use the traditional method of event handling in Nvim:
autocommands. When a LSP client is attached to a buffer, fire a
`LspAttach`. Likewise, when a client detaches from a buffer fire a
`LspDetach` event.
This enables plugins to easily add LSP-specific configuration to buffers
as well as enabling users to make their own configurations more modular
(e.g. by creating multiple LspAttach autocommands that each do
something unique).
Remove the command('qall!') from mksession_spec.lua because it prevents
helpers.rmdir() from retrying.
Allow extra trailing spaces when matching terminal lines.
Problem: Recursive command line loop may cause a crash.
Solution: Limit recursion of getcmdline().
51f0bfb88a
Cherry-pick e_command_too_recursive from patch 8.2.3957.
Problem:
vim.lsp: require("vim.lsp.health").check()
========================================================================
- ERROR: Failed to run healthcheck for "vim.lsp" plugin. Exception:
function health#check, line 20
Vim(eval):E5108: Error executing lua ...m/HEAD-6613f58/share/nvim/runtime/lua/vim/lsp/health.lua:20: attempt to index a nil value
stack traceback:
...m/HEAD-6613f58/share/nvim/runtime/lua/vim/lsp/health.lua:20: in function 'check'
[string "luaeval()"]:1: in main chunk
Solution:
Check for nil.
fix#18602