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 docs for `nvim_buf_set_extmark` mention that you can create a new
extmark when passing in `id=0`, however if you do this you'll get an
error since the code checks that id is positive.
```
id is not a positive integer
```
This change re-words the sentence to make it clearer.
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.