Problem: 'shortmess' flag "n" not used in two places.
Solution: Make use of the "n" flag consistent. (Nick Jensen, closesvim/vim#6245,
closesvim/vim#6244)
722e505d1a
Problem: :echomsg and :echoerr do not handle List and Dict like :echo does.
(Daniel Hahler)
Solution: Be more tolerant about the expression result type.
461a7fcfce
Add lua functional tests for :echo,:echon,:echomsg,:echoerr
because nvim did not port "test_" functions from Vim
that modify internal state.
Testing :echoerr via try/catch is sufficient.
Problem: When session-restore creates a terminal buffer with command
like `:edit term://.//16450:/bin/bash`, the buffer gets
a different name (depends on PID). Thus the later call to
`bufexists('term://.//16450:/bin/bash)` will return false.
Solution: Force the buffer name with :file. This as least ensures
the same buffer will show in multiple windows correctly, as
expected when saving the session. But it still has problems:
1. the PID in the buffer name is bogus
2. redundant :terminal buffers still hang around
fix#5250
This makes it possible to restore the working directory of :terminal
buffers when reading those buffers from a session file.
Fixes#11288
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
It is perfectly fine and expected to detach from the screen just by
the UI disconnecting from nvim or exiting nvim. Just keep detach() in
screen_basic_spec, to get some coverage of the detach method itself.
This avoids hang on failure in many situations (though one could argue
that detach() should be "fast", or at least "as fast as resize",
which works in press-return already).
Never use detach() just to change the size of the screen, try_resize()
method exists for that specifically.
Problem:
During a refactor long ago, we changed the `getdigits_*` familiy of
functions to abort on overflow. But this is often wrong, because many
of these codepaths are handling user input.
Solution:
Decide at each call-site whether to use "strict" mode.
fix#5555
For unknown reasons it does not have the trailing space in `:args`
output there anymore:
[ FAILED ] test/functional\ex_cmds\arg_spec.lua @ 11: :argument does not restart :terminal buffer
test/functional\ex_cmds\arg_spec.lua:25: Expected objects to be the same.
Passed in:
(string) '
[term://.//4552:C:\Windows\system32\cmd.exe]'
Expected:
(string) '
[term://.//4552:C:\Windows\system32\cmd.exe] '
stack traceback:
test/functional\ex_cmds\arg_spec.lua:25: in function <test/functional\ex_cmds\arg_spec.lua:11>
The test is not about that though, and this can be made less strict by
using `trim()`. The new test in `test_arglist.vim` for no trailing
newline is OK, and contains trailing spaces. So this is likely due to
the length of it exceeding the column width already.
This matches Vim behavior. From `:help :ls` :
R a terminal buffer with a running job
F a terminal buffer with a finished job
? a terminal buffer without a job: `:terminal NONE`
TODO: implement `:terminal NONE`.
ref #10349
Problem: No simple way to label quickfix entries.
Solution: Add the "module" item, to be used instead of the file name for
display purposes. (Martin Szamotulski)
d76ce85266
Nvim doesn't expect a window-changing command on an created-window event.
autocmd WinNew * wincmd p
help help
- A snapshot for window 1000 is created.
- The window is split and the cursor changes to the new window 1001.
- The autocmd kicks in and switches back to 1000.
- The help buffer is opened.
- On closing the help window 1000, it tries to go back to the snapshotted window
which is... 1000.
- wp1000->w_buffer == NULL
- w_buffer is used by check_cursor()
- 🧨 -> 💥
Fixes https://github.com/neovim/neovim/issues/9773
- Return the menu properties, not only its children.
- If the {path} param is given, return only the first node. The "next"
nodes in the linked-list are irrelevant.
:menu should print sub-menu contents. E.g. this should print the
"File.Save" submenu:
nvim -u NORC
:source $VIMRUNTIME/menu.vim
:menu File.Save
Regressed in dc685387a3
Blocks #8173
menu_get() also was missing some results for some cases.
In vim, scrolling a window might mess up the cmdline. To keep it simple,
cmdline was always cleared for any window scroll. In nvim, where safe scrolling
is implemented in the TUI layer, this problem doesn't exist.
Clearing the message on scrolling, when we not do it e.g when switching tabs
is a bit weird, as the former is a much smaller context change.
A vim patch introduced the possibility to avoid the cmdlline clear for
redraws caused by async events. This case will now trivially be covered,
as the redraw is always avoided.
vim-patch:8.0.0592: if a job writes to a buffer screen is not updated