Problem: Vim9: builtin function arguments not checked at compile time.
Solution: Add more type checks. (Yegappan Lakshmanan, closesvim/vim#8539)
5b73992d8f
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: Using freed memory when executing delfunc at the more prompt.
Solution: Check function list not changed in another place. (closesvim/vim#11437)
398a26f7fc
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem:
On Windows, :make does not display the output of the program it runs.
The cause is the default 'shellpipe'. On Linux, nvim uses `tee` to redirect the
output to both stdout and the error file. In Windows, for both cmd.exe and
powershell, the output is only redirected to the error file.
Solution:
- On Windows, change the 'shellpipe' default to "2>&1| tee".
- Nvim includes `tee` in its Windows package.
- Document recommended defaults for powershell.
Fixes#12910
Problem:
has('gui_running') is still common in the wild and our answer has
changed over time, causing frustration.
95a6ccbe9f
Solution:
Use stdin_tty/stdout_tty to decide if a UI is (not) a GUI.
Problem:
The sleep before collecting the initial screen state is confusing and
may lead to unexpected success if it comes after a blocking RPC call.
Solution:
Remove that sleep and add an "intermediate" argument.
test(exepath): test if exepath returns correct path with multiple
Windows shells
This test covers the changes from #21175 where exepath() is set to
prefer file extensions in powershell.exe aswell as in cmd.exe.
In both shells, the file with a valid extension should be returned
instead of the extensionless file.
Problem:
Tests that _intentionally_ fail certain conditions cause noise in
$NVIM_LOG_FILE:
$NVIM_LOG_FILE: /home/runner/work/neovim/neovim/build/.nvimlog
(last 100 lines)
WRN 2023-01-16T18:26:27.673 T599.7799.0 unsubscribe:519: RPC: ch 1: tried to unsubscribe unknown event 'doesnotexist'
WRN 2023-01-16T18:29:00.557 ?.11151 server_start:163: Failed to start server: no such file or directory: /X/X/X/...
WRN 2023-01-16T18:33:07.269 127.0.0.1:12345 server_start:163: Failed to start server: address already in use: 127.0.0.1
...
-- Output to stderr:
module 'vim.shared' not found:
no field package.preload['vim.shared']
no file './vim/shared.lua'
no file '/home/runner/nvim-deps/usr/share/lua/5.1/vim/shared.lua'
no file '/home/runner/nvim-deps/usr/share/lua/5.1/vim/shared/init.lua'
no file '/home/runner/nvim-deps/usr/lib/lua/5.1/vim/shared.lua'
no file '/home/runner/nvim-deps/usr/lib/lua/5.1/vim/shared/init.lua'
no file './vim/shared.so'
...
E970: Failed to initialize builtin lua modules
Solution:
- Log to a private $NVIM_LOG_FILE in tests that intentionally fail and
cause ERR log messages.
- Assert that the expected messages are actually logged.
Problem:
The calculation of `len` in `make_filter_cmd` for powershell falls short
by one character for the following ex command:
:%w !sort
This command satisfies these conditions:
- `itmp` is not null
- `otmp` is null
__NOTE__ that other shells circumvent this bug only because of `len`
allocation for six extra characters: a pair of curly braces and four
spaces:
cfdb4cbada/src/nvim/ex_cmds.c (L1551-L1554)
If allocation for these six characters are removed, then bash also faces
the same bug.
Solution:
Add allocation for 6 extra bytes. 1 would do, but let's keep powershell
in sync with other shells as much as possible.
Extend the capabilities of is_os to detect more platforms such as
freebsd and openbsd. Also remove `iswin()` helper function as it can be
replaced by `is_os("win")`.
- `:write ++p foo/bar/baz.txt` should create parent directories `foo/bar/` if
they do not exist
- Note: `:foo ++…` is usually for options. No existing options have
a single-char abbreviation (presumably by design), so it's safe to
special-case `++p` here.
- Same for `writefile(…, 'foo/bar/baz.txt', 'p')`
- `BufWriteCmd` can see the ++p flag via `v:cmdarg`.
closes#19884
Problem: Crash when trying to use s: variable in typed command.
Solution: Don't use the script index when not set. (Ken Takata,
closesvim/vim#6366)
8e6cbb7232
Problem: Regexp benchmark stest is old style.
Solution: Make it a new style test. Fix using a NULL list. Add more tests.
(Yegappan Lakshmanan, closesvim/vim#5963)
ad48e6c159
N/A patches:
vim-patch:9.0.0829: wrong counts in macro comment
Problem:
If the shell command passed to the filtered bang command isn't found,
the error isn't redirected to the temp.out file when shell is set to
powershell.
Solution: Use anonymous function with Invoke-Command operator (&).
Problem:
`Start-Process` requires the command to be split into the shell
command and its arguments. Previously it was done by parsing, which
didn't handle cases such as
- commands with escaped space in their filepath
- quoted commands with space in their filepath
Solution:
Use
- `pwsh -Command` instead of `Start-Process`
- `Get-Content` instead of `-RedirectStandardInput`
- `Out-File` instead of `-RedirectStandardOutput`
vim-patch:9.0.0341: mapset() does not restore <Nop> mapping properly
Problem: mapset() does not restore <Nop> mapping properly.
Solution: Use an empty string for <Nop>. (closesvim/vim#11022)
92a3d20682
`!did_throw` doesn't exactly imply `!current_exception`, as `did_throw = false`
is sometimes used to defer exception handling for later (without forgetting the
exception). E.g: uncaught exception handling in `do_cmdline()` may be deferred
to a different call (e.g: when `try_level > 0`).
In #7881, `current_exception = NULL` in `do_cmdline()` is used as an analogue of
`did_throw = false`, but also causes the pending exception to be lost, which
also leaks as `discard_exception()` wasn't used.
It may be possible to fix this by saving/restoring `current_exception`, but
handling all of `did_throw`'s edge cases seems messier. Maybe not worth
diverging over.
This fix also uncovers a `man_spec.lua` bug on Windows: exceptions are thrown
due to Windows missing `man`, but they're lost; skip these tests if `man` isn't
executable.
Problem: Several errors are not tested for.
Solution: Add tests. (Yegappan Lakshmanan, closesvim/vim#5892)
ee4e0c1e9a
Omit Test_range() change: reverted in patch 8.2.0615.
Cherry-pick Test_z_no_space_before_xxx() from patch 8.2.0195.
Cherry-pick Test_reverse_sort_uniq() change from patch 8.2.0183.
Make uniq() error behavior consistent with sort().
Cherry-pick Test_set_ttytype() change from patch 8.1.1826.
Cherry-pick quickfix checks from patch 8.1.2373 to test_preview.vim.
Test_viminfo_error() is applicable.
Cherry-pick E1058 from patch 8.2.0149 and port Test_deep_nest() to Lua.
Problem: Peeking and flushing output slows down execution.
Solution: Do not update the mode message when global_busy is set. Do not
flush when only peeking for a character. (Ken Takata)
cb574f4154
Omit inchar() change: it breaks too many tests.
N/A patches for version.c:
vim-patch:8.2.5170: tiny issues
Problem: Tiny issues.
Solution: Tiny improvements.
944cc9ceba
Test ":unlet self-referencing node in a List graph #6070" feeds many characters into typeahead, so a timeout of only 100 milliseconds sometimes fails. Change that timeout to 1000 milliseconds.
Problem: maparg() does not provide enough information for mapset().
Solution: Add "lhsraw" and "lhsrawalt" items. Drop "simplified"
9c65253fe7
vim-patch:9.0.0127: unused variable
Problem: Unused variable.
Solution: Remove the variable. (closesvim/vim#10829)
e95f22f63a
Problem:
Since 0b9664f524 powershell filtered
:[range]! commands with args causes error:
"Start-Process: A positional parameter cannot be found that accepts argument ..."
Solution:
Pass args to Start-Process via `-ArgumentList`.
closes#19250