Define a CMake target for every subdirectory of test/functional that
contains functional tests, and a functionaltest_parallel target that
depends on all those targets, allowing multiple test runners to run in
parallel.
On CI, use at most 2 parallel test runners, as using more may increase
system load and make tests unstable.
Problem:
Some UI clients break if space follows the comma in 'guifont' items.
Also the new 'guifont' default may cause problems if none of the fonts are found.
Solution:
Remove trailing whitespace.
Add a "monospace" fallback which `fontconfig` can resolve on *nix systems.
vim-patch:2e9db8fa9 runtime(doc): add Swedish entries to Make_all.mak, add conversion rule to Makefile
vim-patch:776b07000 installman: Update the sed patterns in installman.sh
vim-patch:9fe5a1d55 runtime(doc): Use ellipses for overlength example comments at :help vim9.txt
vim-patch:75541da4c runtime(doc): Update todo.txt and remove solved issues
vim-patch:9.1.0001: tests: Test_popup_setbuf() fails
vim-patch:4cae20c47 README: Updated version from 91 to 92 in various READMEs
vim-patch:93f05b6d4 Makefile: dosrt target fails because of duplicate lang directories
vim-patch:9.2.0008: MS-Windows: font size calculation may be wrong
vim-patch:9.2.0010: Using Wayland compositor is still slow
vim-patch:9.2.0012: Build fails when wayland is not defined
vim-patch:9.2.0013: parallel make invocation may break Wayland header generation
vim-patch:823f4f12b proto: make proto doesn't handle bool type correctly
Problem: Implicitly setting message target when 'cmdheight' changes.
Solution: Just use the user configured target. Support "cmd" target
with 'cmdheight' set to 0.
Problem:
When MsgArea highlight is changed, the next message may flash
and disappear because msg_start() renders with stale highlight attributes.
msg_puts_len() uses HL_ATTR(HLF_MSG) to render message text, which
happens before update_screen() calls highlight_changed().
So the message is rendered with outdated attrs.
Solution:
Call highlight_changed() in msg_start().
Problem: Opening a terminal on an empty buffer produces a spurious
buffer update event.
Solution: Don't call deleted_lines_buf() if no lines have been deleted.
Problem: Paging keys being consumed without obvious indicator
in the dialog window can be surprising.
Solution: Display a hint with paging keys in the dialog window title
when paging is active. Recognize <Esc> as mapping to stop
paging.
Problem: prompt_setprompt memory leak/other issues when fixing prompt line for
unloaded buffer, or when ': line number is zero.
Solution: don't fix prompt line for unloaded buffer. Clamp ': lnum above zero.
Problem: vim.on_key() called for each message while cmdline is open.
Cursor is on a seemingly random column when pager is entered.
Entering the pager while the cmdline is expanded can be more
convenient than pressing "g<".
Pager window is unnecessarily clamped to half the shell height.
Setting 'laststatus' while pager is open does not adjust its
dimensions.
Solution: Only call vim.on_key() once when dialog window is opened.
Ensure cursor is at the start of the first message when
entering the pager.
Enter the pager window when "<CR>" is pressed while the
cmdline is expanded.
Don't clamp the pager window height.
Set message windows dimensions when 'laststatus' changes.
Problem: Logic determining messages belonging to the last command to
show with "g<" does not flush pending messages. This can
result in clearing the temporary message history before a
message still belonging to the previous command was emitted.
Solution: Flush pending messages when marking the end of messages
belonging to previous command.
Problem:
stack->offset value is used as an array index.
Solution:
Instead of comparing the stack->offset value to the size in bytes of the array,
compare the actual length of the array.
Problem: A multi-line extmark that ends exactly at a deleted range end
is not invalidated.
Revalidated sign mark is added with incorrect range.
Solution: Remove questionable invalidation range condition which was
originally added to avoid deleting a mark that ends below a
deleted line.
Since splicing for a deleted line, and a replaced range that
explicitly ends at column 0 beyond a deleted line is identical,
we can't try to distinguish these two cases. I.e. :1delete 1
and nvim_buf_set_text(0, 0, 0, 1, 0, {}) yield the same splice
operation.
This means that a multi-line sign_text mark should now span at
least one column beyond its end_row, as seen in the adjusted
test. This is still somewhat unexpected/inconvenient to me
which is what prompted me to try to avoid it with the original
condition.
Add revalidated sign mark back to decor with correct range;
third sign mark added to test exposed a crash.
Problem: A float whose zindex is below the cmdline can be enlarged and
end up behind the cmdline.
Solution: Clamp height of such windows to not extend beyond 'cmdheight'.
Problem: Strange behavior when opening terminal on unloaded buffer.
Solution: For nvim_open_term() ensure the buffer is loaded as it needs
to be read into the terminal. For jobstart() just open the
memfile as the file content isn't needed.
Not going to make nvim_open_term() pass stdin to the terminal when stdin
isn't read into a buffer yet, as other APIs don't read stdin on unloaded
buffer either. There are also other problems with loading buffer before
reading stdin, so it's better to address those in another PR.
Problem: Setting a byte in a blob, accepts values outside 0-255
Solution: When setting a byte in a blob, check for valid values
(Yegappan Lakshmanan)
closes: vim/vim#18870f4a299700e
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: items() does not work for Blobs
Solution: Extend items() to support Blob
(Yegappan Lakshmanan).
closes: vim/vim#18080da34f84847
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: Vim9: outdated TODO items, disabled tests that work.
Solution: Remove TODO items, run tests that work now. Check that a dict
item isn't locked.
71b7685092
Co-authored-by: Bram Moolenaar <Bram@vim.org>
- ':!' is not stable, so use system() to get more consistent behaviour.
- Only warns when using 'pwsh'.
- Remove trailing spaces.
closes: vim/vim#19370abac1c1aa6
Co-authored-by: Mao-Yining <mao.yining@outlook.com>
Co-Authored-by: @lxhillwind
Remove `nextgroup=shComment` from the `shEscape` syntax pattern.
This was causing `#` characters after escape sequences inside
double-quoted strings to be misinterpreted as comments, breaking
highlighting for the rest of the file.
Add a test case for escaped characters followed by # in double quotes.
fixes: vim/vim#19053closes: vim/vim#19414c68e64dac3
Co-authored-by: Bozhidar Batsov <bozhidar@batsov.dev>
Problem: tests: the tests test_cindent_* functions were numbered
inconsistently, causing them to be executed in wrong order.
Solution: Rename the test_cindent functions with zero-padded numbers.
9308c85a7e
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: Comment lines which start like a label are recognized as a
label and indented based on that.
Solution: Check if the position is in a comment after recognizing a label
in cin_islabel (Anttoni Erkkilä)
closes: vim/vim#193979af18686c7
Co-authored-by: Anttoni Erkkilä <anttoni.erkkila@protonmail.com>
Problem: if init_prompt replaces the prompt line at the ': mark, it calls
inserted_bytes with the wrong lnum.
Solution: use the correct lnum. Call appended_lines_mark instead when appending
the prompt at the end.
Problem: prompt_setprompt does not adjust extmarks or trigger on_bytes
buffer-updates when fixing the prompt line.
Solution: adjust them, trigger on_bytes.
Notably, hides extmarks when replacing the entire line (and clearing user
input). Otherwise, when just replacing the prompt text, hides extmarks there,
but moves those after (in the user input area) to the correct spot.
Problem: prompt_setprompt calls coladvance with a byte column, but it expects a
screen column. on_lines buffer-updates aren't fired when fixing the prompt line.
Solution: don't use coladvance. Call changed_lines, which also simplifies the
redraw logic. (and calls changed_cline_bef_curs if needed; added test checks
this)
Unlike https://github.com/neovim/neovim/pull/37743/changes#r2775398744, this
means &modified is set by prompt_setprompt if it fixes the prompt line.
Not setting &modified is inconsistent anyway -- even init_prompt sets it if it
fixes the prompt line.
**Problem:** No easy way to stack highlight groups #35806.
**Solution:** Add a way to specify a new statusline chunk with a
highlight group that inherits from previous highlight attributes.
Also applies to tabline, etc.
The [spec for `workspace/configuration`](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_configuration)
marks the `section` property of each item in `items` optional.
Therefore, I believe it violates the spec to skip over items without
a section, because then the length of the results won't match the length
of a valid `items` input. The spec does not elaborate on _what_ to
return in this case, but I don't think it would be controversial to say
that returning the full configuration, as done for an empty string, is
the most natural interpretation.
That empty string case, by the way, was initially [added in
response](5da124fc82)
to a real world implementation requesting it. I don't have a similar
real world implementation to point to for the omitted `section`, but
I would note that `getConfiguration()` from `vscode-languageserver-node`
[defaults to a request with no section](d859bb14d1/server/src/common/configuration.ts (L24-L26))
when called with no arguments. I surmise that this is intended as a way
to retrieve the full configuration.
Problem:
When quitting Nvim, LSP servers will not be force-stopped, even if
ClientConfig.exit_timeout is set to an integer.
pkill emmylua_ls; VIMRUNTIME=runtime/ nvim --clean -u repro.lua repro.lua ; waitpid $(pgrep emmylua_ls)
vim.lsp.config('foo', { cmd = { 'emmylua_ls' }, exit_timeout = 1000 })
vim.lsp.enable('foo')
vim.defer_fn(vim.cmd.quit, 500)
Solution:
On VimExit, wait up to `exit_timeout:integer` milliseconds for servers
to exit. Do this with an explicit `vim.wait()`, because the actual
force-stop is deferred, and won't be attempted if Nvim exits before
then.
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
When the terminal process is suspended, putting cursor at bottom-left
hints that pressing a key will change the suspended state. However, when
returning to Normal mode, the user is more likely to interact with the
actual terminal output (e.g. copying it), so it's better to put cursor
at the old position which should be closer to the output.
Also, using is_focused() to check for mode is confusing. Just check
`State & MODE_TERMINAL` instead.