| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
| |
Note: The crash happens in the second test case when using uninitialized
memory, and therefore doesn't happen with ASAN.
|
|
|
|
|
|
|
|
|
| |
Problem: Not easy to filter the output of maplist().
Solution: Add mode_bits to the dictionary. (Ernie Rael, closes vim/vim#10356)
https://github.com/vim/vim/commit/d8f5f766219273a8579947cc80b92580b6988a4b
Co-authored-by: Ernie Rael <errael@raelity.com>
|
|
|
|
|
|
|
|
|
| |
Problem: It is not easy to restore saved mappings.
Solution: Make mapset() accept a dict argument. (Ernie Rael, closes vim/vim#10295)
https://github.com/vim/vim/commit/51d04d16f21e19d6eded98f9530d84089102f925
Co-authored-by: Ernie Rael <errael@raelity.com>
|
|
|
|
|
|
|
|
|
| |
Problem: maparg() does not indicate the type of script where it was defined.
Solution: Add "scriptversion".
https://github.com/vim/vim/commit/a9528b39a666dbaa026320f73bae4b1628a7fe51
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
| |
(#25605)
Problem: Vim9: in script cannot set item in uninitialized list.
Solution: When a list is NULL allocate an empty one. (closes vim/vim#8461)
https://github.com/vim/vim/commit/e65081d1b591f16dc6e380a830d87565c5eb7b03
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Some tests fail with $SHELL=fish #6172
Related: https://github.com/neovim/neovim/pull/6176
Solution:
Replace "echo -n" with "printf", because "echo" in sh may be provided
as a shell builtin, which does not accept an "-n" flag to avoid a
trailing newline (e.g. on macos). "printf" is more portable (defined by
POSIX) and it does not output a trailing newline by itself.
Fixes #6172
TODO:
Other test failures may be related to "session leader" issue: https://github.com/neovim/neovim/issues/2354
Checked by running `:terminal ./build/bin/tty-test` from Nvim with
`shell=/bin/fish` (inherited from `$SHELL`) and it indeed complains
about "process does not own the terminal". With `shell=sh` it doesn't complain. And
unsetting `$SHELL` seems to make `nvim` to fall back to `shell=sh`.
FAILED test/functional/terminal/tui_spec.lua @ 1017: TUI paste: terminal mode
test/functional/terminal/tui_spec.lua:1024: Row 1 did not match.
Expected:
|*tty ready |
|*{1: } |
|* |
| |
|{5:^^^^^^^ }|
|{3:-- TERMINAL --} |
|{3:-- TERMINAL --} |
Actual:
|*process does not own the terminal |
|* |
|*[Process exited 2]{1: } |
| |
|{5:^^^^^^^ }|
|{3:-- TERMINAL --} |
|{3:-- TERMINAL --} |
To print the expect() call that would assert the current screen state, use
screen:snapshot_util(). In case of non-deterministic failures, use
screen:redraw_debug() to show all intermediate screen states.
stack traceback:
test/functional/ui/screen.lua:622: in function '_wait'
test/functional/ui/screen.lua:352: in function 'expect'
test/functional/terminal/tui_spec.lua:1024: in function <test/functional/terminal/tui_spec.lua:1017>
FAILED test/functional/terminal/tui_spec.lua @ 1551: TUI forwards :term palette colors with termguicolors
test/functional/terminal/tui_spec.lua:1567: Row 1 did not match.
Expected:
|*{1:t}ty ready |
| |
|* |
| |
|{2:^^^^^^^ }|
| |
|{3:-- TERMINAL --} |
Actual:
|*{1:p}rocess does not own the terminal |
| |
|*[Process exited 2] |
| |
|{2:^^^^^^^ }|
| |
|{3:-- TERMINAL --} |
To print the expect() call that would assert the current screen state, use
screen:snapshot_util(). In case of non-deterministic failures, use
screen:redraw_debug() to show all intermediate screen states.
stack traceback:
test/functional/ui/screen.lua:622: in function '_wait'
test/functional/ui/screen.lua:352: in function 'expect'
test/functional/terminal/tui_spec.lua:1567: in function <test/functional/terminal/tui_spec.lua:1551>
|
|
|
|
|
|
|
|
|
| |
Problem: Need more state() tests
Solution: Add a few more tests for operater pending mode and register
yank command
closes: vim/vim#12883
https://github.com/vim/vim/commit/8dabccd295271104ad5af0abc48e283d644cff59
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Problem: state() test fails on some Mac systems.
Solution: Increase the wait time. (closes vim/vim#4983)
https://github.com/vim/vim/commit/b7a97ef340f03ca08df8c8e00cd5580f61aac824
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
| |
Problem: No tests for state().
Solution: Add tests. Clean up some feature checks. Make "a" flag work.
https://github.com/vim/vim/commit/c2585490321854ca3df115efcf0b40986901d96c
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
| |
This aligns its behaviour better with `nvim_win_close`.
Note that `:hide` is actually incapable of closing the cmdwin, unlike `:close`
and `:quit`, so this is a bit of a difference in behaviour.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: nvim_buf_set_text(), nvim_open_term() and termopen() all change buffer
text, which is forbidden during textlock. Additionally, nvim_open_term() and
termopen() may be used to convert the cmdwin buffer into a terminal buffer,
which is weird.
Solution: Allow nvim_buf_set_text() and nvim_open_term() in the cmdwin, but
disallow nvim_open_term() from converting the cmdwin buffer into a terminal
buffer. termopen() is not allowed in the cmdwin (as it always operates on
curbuf), so just check text_locked().
Also happens to improve the error in #21055: nvim_buf_set_text() was callable
during textlock, but happened to check textlock indirectly via u_save();
however, this caused the error to be overwritten by an unhelpful "Failed to
save undo information" message when msg_list == NULL (e.g: an `<expr>` mapping
invoked outside of do_cmdline()).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: some API functions that check textlock (usually those that can change
curwin or curbuf) can break the cmdwin.
Solution: make FUNC_API_CHECK_TEXTLOCK call text_locked() instead, which already
checks for textlock, cmdwin and `<expr>` status.
Add FUNC_API_TEXTLOCK_ALLOW_CMDWIN to allow such functions to be usable in the
cmdwin if they can work properly there; the opt-in nature of this attribute
should hopefully help mitigate future bugs.
Also fix a regression in #22634 that made functions checking textlock usable in
`<expr>` mappings, and rename FUNC_API_CHECK_TEXTLOCK to FUNC_API_TEXTLOCK.
|
|
|
|
| |
followup to #24109
fix #16150
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
conversion
Problem: Tests failing because there is no error for float to string
conversion.
Solution: Change the check for failure to check for correct result. Make
some conversions strict in Vim9 script.
https://github.com/vim/vim/commit/3cfa5b16b06bcc034f6de77070fa779d698ab5e9
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#23817)
Problem: Incsearch not triggered when pasting clipboard register on the
command line.
Solution: Also set "literally" when using a clipboard register. (Ken Takata,
closes vim/vim#12460)
https://github.com/vim/vim/commit/9cf6ab133227ac7e9169941752293bb7178d8e38
Co-authored-by: K.Takata <kentkt@csc.jp>
|
|
|
|
| |
`nvim_(get|set)_option_value` pick the current buffer / window by default for buffer-local/window-local (but not global-local) options. So specifying `buf = 0` or `win = 0` in opts is unnecessary for those options. This PR removes those to reduce code clutter.
|
|
|
|
|
| |
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: famiu <famiuhaque@protonmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
Problem: Slightly inconsistent error messages.
Solution: Make it "Using a Float". (closes vim/vim#10959)
https://github.com/vim/vim/commit/dde77a7c4d72622284dc5fb72557bde42c314fa6
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
| |
Problem: Inconsistent capitalization in error messages.
Solution: Make capitalization consistent. (Doug Kearns)
https://github.com/vim/vim/commit/cf030578b26460643dca4a40e7f2e3bc19c749aa
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
| |
Problem: Vim9: builtin function arguments not checked at compile time.
Solution: Add more type checks. (Yegappan Lakshmanan, closes vim/vim#8539)
https://github.com/vim/vim/commit/5b73992d8f82be7ac4b6f46c17f53ffb9640e5fa
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
| |
Discovered using --shuffle argument of busted.
|
|
|
|
|
|
|
|
|
|
| |
(#23314)
Problem: Using freed memory when executing delfunc at the more prompt.
Solution: Check function list not changed in another place. (closes vim/vim#11437)
https://github.com/vim/vim/commit/398a26f7fcd58fbc6e2329f892edbb7479a971bb
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
test: replace lfs with luv
luv already pretty much does everything lfs does, so this duplication
of dependencies isn't needed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
https://github.com/vimpostor/vim-tpipeline/commit/95a6ccbe9f33bc42dd4cee45731d8bc3fbcd92d1
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.
|
|
|
|
|
| |
This reverts commit 8b8ecf44f2cda43bbd710ec22ef99439b71888cd.
It is causing performance problems on exit.
Fix #21082.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Now with try_end() including more exception info, E5500 looks like
redundant information.
Adjust tests for more exception information.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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:
https://github.com/neovim/neovim/blob/cfdb4cbada8c65aa57e69776bcc0f7b8b298317a/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,
closes vim/vim#6366)
https://github.com/vim/vim/commit/8e6cbb72324b6fb25d1a9abd6cc4d102d0e5f14e
|
|
|
|
|
|
|
|
|
|
| |
Problem: Regexp benchmark stest is old style.
Solution: Make it a new style test. Fix using a NULL list. Add more tests.
(Yegappan Lakshmanan, closes vim/vim#5963)
https://github.com/vim/vim/commit/ad48e6c1590842ab6d48e6caba3e9250734dae27
N/A patches:
vim-patch:9.0.0829: wrong counts in macro comment
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Build failure.
Solution: Add missing changes.
https://github.com/vim/vim/commit/3a0f092ac0dbdd4ce71f9c4abe020e89f13df36c
Omit E1176: only applicable to Vim9 script.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
|