Since vimscript can close buffers at any time, it is possible that a
refresh_timer_cb will be called with an invalid buffer, but there's no way to
detect this if only a reference is stored because the memory can be reused by
the allocator. Use buf_T->handle which is guaranteed to be unique.
@4b98ea1e80bf changed how refcounts are handled internally to fit into job
control semantics. Change the refcount check in `ex_delfunction` to consider
this. Close#3000
"python -c" returns 1 in case of an error. Use a return code of 2 if
the Neovim module is not found to distinguish these cases.
Verify the interpreter version before checking for an installed Neovim
module. Show a new error message if the Python interpreter version
is below the minimum required version.
Always use "pkgutil" to determine if the Neovim module is installed.
In contrast to "importlib", which was used for Python 3,
"pkgutil.find_loader" is available for all Python versions [1,2].
"pkgutil.find_loader" internally uses "importlib" for Python >= 3.3 [2].
Also, the previously used "importlib.find_loader" is only available
since Python 3.3 (so checking the major Python version was not enough)
and deprecated since Python 3.4 [3].
Finally, conditioning on the major version in Vimscript was incorrect,
as checking the Neovim module for a certain Python major version does
not mean that the tested interpreters are actually of that version.
For example, we test the "python" executable, which is Python 2 on
Ubuntu and Python 3 on Arch Linux.
[1] https://docs.python.org/2/library/pkgutil.html#pkgutil.find_loader
[2] https://docs.python.org/3/library/pkgutil.html#pkgutil.find_loader
[3] https://docs.python.org/3/library/importlib.html#importlib.find_loader
According to the vim helpfile:
> fnamemodify({fname}, {mods})
> ...
> Note: Environment variables don't work in {fname}, use
> expand() first then.
So this causes issues if your $MYVIMRC contains environment variables
(e.g. $XDG_CONFIG_HOME)
Before, running Nvim in a directory containing a Python module `neovim`,
or one that is imported by it or a plugin, will load that module and not
the system one. So Nvim might be tricked into running arbitrary scripts
from the current working directory.
Fixes#1665Fixes#2530
A file that matches with one of the patterns in 'wildignore' is ignored
when using expand_wildcards(). After removing ignored files, the array
of (file name) matches can be empty. But an empty array is never freed.
Instead of just caching the third-party build output, cache the full
build directory. Always run make to ensure that updated dependencies
are downloaded.
Introduce ALLOW_EXISTING_SRC_DIR option, turned off by default.
The Homebrew formula, which downloads and extracts the third-party
dependency sources before starting the build, would turn this option
ON.