Problem: The list_lbr_utf8 test fails if ~/.vim/syntax/c.vim sets
'textwidth' to a non-zero value. (Oyvind A. Holm)
Solution: Add a setup.vim file that sets 'runtimepath' and $HOME to a safe
value. (partly by Christian Brabandt, closesvim/vim#912)
89b10421ca
Problem: When a keymap is active only "(lang)" is displayed. (Ilya
Dogolazky)
Solution: Show the keymap name. (Dmitri Vereshchagin, closesvim/vim#933)
73ac0c4281
Also make setpos("'A", [999, 1, 1, 0]) fail, i.e. return -1 (assuming there is no buffer 999).
Fixes#5713
Background:
`:help setpos()` mentions an argument `"bufnum"` that determines the buffer a mark should be put in.
This argument is respected for uppercase marks, but not for lowercase marks.
This is reasonable (though I personally would like `setpos()` to be able to set marks in other buffers), but the help doesn't mention this anywhere.
It's also strange that attempting to change buffers with `setpos('.', [bufnr('#'), 1, 1, 0])` alerts the user that having a different buffer is an error, while attempting to set a mark with `setpos("'d", [bufnr('#'), 1, 1, 0])` doesn't tell the user that the `"bufnum"` argument is an error.
This was an attempt to enable test/functional/provider/python3_spec.lua
It actually *does* appear to work if we do this:
mingw32-make functionaltest VERBOSE=1 PATH=C:\Python35;C:\Python27;%PATH%
Note that %PATH% *already* has C:\Python35 at its start by then, so
PATH=C:\Python35;C:\Python27;%PATH% is _redundant_.
python3_spec.lua *does* find python3.exe in that case, and succeeds.
But it causes weird failures in unrelated tests:
[----------] Running tests from C:/projects/neovim/test/functional\core\job_partial_spec.lua
[ RUN ] ...rojects/neovim/test/functional\core\job_partial_spec.lua @ 17: jobs with partials works correctly
.\test\functional\helpers.lua:89: Vim(call):E903: Process for command "powershell" could not be spawned
stack traceback:
.\test\functional\helpers.lua:89: in function 'request'
.\test\functional\helpers.lua:147: in function 'nvim_command'
.\test\functional\helpers.lua:344: in function 'source'
...rojects/neovim/test/functional\core\job_partial_spec.lua:18: in function <...rojects/neovim/test/functional\core\job_partial_spec.lua:17>
[ ERROR ] ...rojects/neovim/test/functional\core\job_partial_spec.lua @ 17: jobs with partials works correctly (0.00 ms)
[ RUN ] C:/projects/neovim/test/functional\eval\execute_spec.lua @ 73: execute() does not capture shell-command output
C:/projects/neovim/test/functional\eval\execute_spec.lua:74: Expected objects to be the same.
Passed in:
(string) '
:!echo "foo"
Cannot execute cmd.exe
shell returned -1
'
Expected:
(string) '
:!echo "foo"
'
stack traceback:
C:/projects/neovim/test/functional\eval\execute_spec.lua:74: in function <C:/projects/neovim/test/functional\eval\execute_spec.lua:73>
[ FAILED ] C:/projects/neovim/test/functional\eval\execute_spec.lua @ 73: execute() does not capture shell-command output (15.60 ms)
[ RUN ] C:/projects/neovim/test/functional\ex_cmds\arg_spec.lua @ 11: :argument does not restart :terminal buffer
C:/projects/neovim/test/functional\ex_cmds\arg_spec.lua:18: Expected objects to be the same.
Passed in:
(boolean) false
Expected:
(boolean) true
stack traceback:
C:/projects/neovim/test/functional\ex_cmds\arg_spec.lua:18: in function <C:/projects/neovim/test/functional\ex_cmds\arg_spec.lua:11>
[ FAILED ] C:/projects/neovim/test/functional\ex_cmds\arg_spec.lua @ 11: :argument does not restart :terminal buffer (0.00 ms)
[ RUN ] C:/projects/neovim/test/functional\ex_cmds\edit_spec.lua @ 11: :edit without arguments does not restart :terminal buffer
C:/projects/neovim/test/functional\ex_cmds\edit_spec.lua:16: Expected objects to be the same.
Passed in:
(boolean) false
Expected:
(boolean) true
stack traceback:
C:/projects/neovim/test/functional\ex_cmds\edit_spec.lua:16: in function <C:/projects/neovim/test/functional\ex_cmds\edit_spec.lua:11>
[ FAILED ] C:/projects/neovim/test/functional\ex_cmds\edit_spec.lua @ 11: :edit without arguments does not restart :terminal buffer (15.60 ms)
[ RUN ] ...s/neovim/test/functional\eval\msgpack_functions_spec.lua @ 457: msgpackparse() function msgpackparse(systemlist(...)) does not segfault. #3135
.\test\functional\helpers.lua:89: Failed to evaluate expression
stack traceback:
.\test\functional\helpers.lua:89: in function 'eval'
...s/neovim/test/functional\eval\msgpack_functions_spec.lua:460: in function <...s/neovim/test/functional\eval\msgpack_functions_spec.lua:457>
[ ERROR ] ...s/neovim/test/functional\eval\msgpack_functions_spec.lua @ 457: msgpackparse() function msgpackparse(systemlist(...)) does not segfault. #3135 (15.63 ms)
[ FAILED ] 3 tests, listed below:
[ FAILED ] C:/projects/neovim/test/functional\eval\execute_spec.lua @ 73: execute() does not capture shell-command output
[ FAILED ] C:/projects/neovim/test/functional\ex_cmds\arg_spec.lua @ 11: :argument does not restart :terminal buffer
[ FAILED ] C:/projects/neovim/test/functional\ex_cmds\edit_spec.lua @ 11: :edit without arguments does not restart :terminal buffer
[ ERROR ] 2 errors, listed below:
[ ERROR ] ...rojects/neovim/test/functional\core\job_partial_spec.lua @ 17: jobs with partials works correctly
[ ERROR ] ...s/neovim/test/functional\eval\msgpack_functions_spec.lua @ 457: msgpackparse() function msgpackparse(systemlist(...)) does not segfault. #3135
64 SKIPPED TESTS
3 FAILED TESTS
2 ERRORS
-- Output to stderr:
The system cannot find the path specified.
CMake Error at C:/projects/neovim/cmake/RunTests.cmake:46 (message):
Running functional tests failed with error: 1.
While a job callback is active, it may be invoked again. Since the
data handled by the first invocation of the callback hasn't been marked
as consumed, the subsequent invocation will see the same data.
Reported-by: Daniel Hahler
Patch-by: oni-link
Closes#5889
Abuse NOTDONE to give some nuance to the return value of readfile(), so
that open_buffer() can distinguish between "failed, lol" and "failed
because the path is a directory".
Before this change, Vim *already* creates a new buffer when a directory
is edited. So there is no reason it should not raise BufEnter, that was
an implementation detail of ye olde readfile().
Most of the changes in this commit merely preserve the old semantics.
The "implicit" change that we actually are interested in, is this line
in `open_buffer()`, where `retval` being non-FAIL allows EVENT_BUFENTER
to be applied:
apply_autocmds_retval(EVENT_BUFENTER, NULL, NULL, FALSE, curbuf, &retval);
References https://github.com/vim/vim/issues/1353
This fixes a use-after-free noticed by ASAN which would occur when a
dictwatcher was still active on a dictionary when the dictionary was
freed.
fun! MakeWatch()
let d = {'foo': 'bar'}
call dictwatcheradd(d, 'foo', function('...'))
endfun
Patch-by: oni-link
Closes#5930
In Windows we cannot rely on absolute install paths to point to the
location of the runtime. Vim uses the path of the current binary as
a possible location for the runtime folder. In Neovim the install
location places the runtime folder in ../share/nvim/runtime.
In Vim this logic is guarded by USE_EXE_NAME, which is defined for win32
and macOS.
TODO: We may need to incorporate similar logic for macOS:
0cdb72aa38/src/misc1.c (L4287-L4308)
Do _not_ set v:shell_error on parameter validation error.
system([...]) does not invoke a shell, so this change is somewhat
questionable. But `:help v:shell_error` is sufficiently vague to allow
-1 in this case.
Setup python2/3 and install the Neovim client in Appveyor to
enable the python tests.
- Use the Python installation provided by Appveyor, because dependencies
pyuv, greenlet have issues compiling with MinGW-w64. And this way we
avoid building those too.
- Copy python.exe => python3.exe so that the python provider can find
python3.