Problem: tests: need better tests for tf files
Solution: Add better filetype test for terraform/tf filetype
closes: vim/vim#1833923f23e611f
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: tests: Test_tagjump.vim leaves swapfiles behind
Solution: Close open buffers using :bw! instead of :close!
05a56aabee
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: tests: Test_getbufwintabinfo() leaves swapfiles behind
Solution: Close all open buffers using %bw!
397ad21268
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: tests: Test_execute_register() leaves swapfile behind
Solution: Use :bw instead of :close to close the buffer completely
791478b30a
Co-authored-by: Christian Brabandt <cb@256bit.org>
Also, don't start the timer at all when a previous shutdown failed, as
in this case a forced shutdown is used and no timer is needed.
This fixes most of the delays caused by #36750.
The delays caused by #36378 still seem to remain.
Problem:
Version check failed because of "equality" comparison, so a version
string of "123abc" would not match "123abcdef".
Solution:
- Adjust verison check.
- Improve bug-report formatting.
Problem: UI callbacks disregard textlock unnecessarily (since d909de2).
Solution: In case the UI is flushed during textlock, make sure Nvim does
not flush UI callbacks that are expected to change text. Instead
assume postponing callbacks during textlock is insignificant,
and will safely happen soon after.
Problem:
Test sometimes fails on macos:
test/functional/terminal/channel_spec.lua:96: Expected objects to be the same.
Passed in:
(number) 3
Expected:
(number) 2
Solution:
Retry a few times.
Problem: When `vim._extui` is enabled, the default tabline shows an
incorrect window count (e.g., "2" when only 1 window is visible). This
happens because the extui pager window has `focusable=true` (needed for
user interaction) but `hide=true` (not visible by default).
Solution: Modify the window counting logic in `statusline.c` and
`ex_docmd.c:ex_tabs()` to also exclude hidden windows
(`wp->w_config.hide`), not just non-focusable windows.
Also updates test expectations in `cmdline2_spec.lua` which previously
expected the incorrect window count "2" when extui was enabled. The test
now correctly expects no window count indicator when only 1 visible
window exists.
Fixes#36759
Problem: Memory leak with :breakadd expr
Solution: Free debug_oldval and debug_newval before assigning to them.
Verify the existing (though confusing) :breakadd expr behavior
(zeertzjq).
It seems that :breakadd expr doesn't work as documented at all. This PR
only fixes the memory leak. The tests are for the existing behavior.
closes: vim/vim#18844a474de64df
Problem: Some tests are slow.
Solution: Make a few test cases faster.
bf63011a52
Only include the RunDbgCmd() to s:RunDbgCmd() change.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Debugger does not display the whole command.
Solution: Set ea.cmd before checking for a breakpoint.
33b55b562b
The code change is already covered by #35019.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem:
Sed thinks the argument starting with `1i` (and triple backticks) is the
suffix for the backup file because it comes right after the `-i` flag.
See for example
https://github.com/neovim/neovim/actions/runs/19774967693/job/56665991723.
Solution:
Explicitly mark it as command using the `-e` flag.
Problem:
MessagePack fixstr format supports string lengths 0-31, but mpack_str()
only used fixstr for lengths < 20. Strings of 20-31 bytes were
incorrectly encoded as str8 (2-byte header) instead of fixstr (1-byte
header).
Solution:
Change the condition from `len < 20` to `len < 32` to match the
MessagePack specification.
This fix affects message timing which exposed a pre-existing race
condition in the channels_spec PTY test. The test now uses a helper
function to accumulate partial PTY reads, making it more robust.
Fixes#32784
Allow the `request` parameter in `tokens_to_ranges` to be `nil` and
update version checking logic accordingly. This prevents errors when
the request is not present and improves robustness of semantic token
handling.
Group up to 15 vimpatch numbers in 1 line to guard against
'make formatc'.
1-liner for vim_versions, num_patches.
Automate '*Version' to remove version.h macros.
'-V1 -v' lists merged Vim versions.
Start from current "v:version".
Exclude reverted patches.
Normalize left-zero-pad patch numbers to avoid grep inverse pattern
file like scripts/vim_na_regexp.txt.
Track reverted patches in vimpatch_token_reverts.txt
because no convention in git-log.
TODO: Track patch numbers per v:version in version.c.
Problem: Cannot access the arguments of the current function in debug mode.
(Luc Hermitte)
Solution: use get_funccal(). (Lemonboy, closesvim/vim#1432, closesvim/vim#1352)
c7d9eacefa
This patch was regressed in e50b545676.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: tests: excessive wait in Test_matchfuzzy_initialized
Solution: Use term_wait() instead of the TermWait() wrapper
(Corey Hickey)
Test_matchfuzzy_initialized is a terminal test, which are specified to be
"flaky" and automatically retried. The TermWait wrapper multiplies the
specified wait time by higher values for later retries, maxing out at
10x the specified value. This makes tries vim/vim#3 to vim/vim#6 sleep for 20 seconds
each, which makes the test very slow to work with. The specified intent
of the test (as noted in a comment eight lines above here) is to
sleep for 2s.
closes: vim/vim#18822d4f9de889b
Co-authored-by: Corey Hickey <bugfood-c@fatooh.org>
Problem: tests: Test_matchfuzzy_initialized() fails
Solution: Send a dummy key (Corey Hickey)
Test_matchfuzzy_initialized seems to expect that the 'lvimgrep' will be
interrupted by sending a SIGINT. If the search finishes beforehand,
though, then the SIGINT triggers vim to tell the user how to quit.
Vim does not show this message immediately, though; instead, vim shows
the message next time it is active. When StopVimInTerminal() sends a key
sequence intended to cause vim to quit, this activates vim to show the
message instead of quitting.
I do not understand every detail of the problem fully--if I type the
characters from StopVimInTerminal() into a post-SIGTERM terminal
directly, that seems to work ok; there seems to be a timing issue due to
sending all the characters at once.
This fix does make the test work reliably for me, and the test still
works even if I limit my CPU frequency so that the search is interrupted
by the SIGINT.
fixes: vim/vim#18821
related: vim/vim#18822a3925d783a
Co-authored-by: Corey Hickey <bugfood-c@fatooh.org>
Problem:
The `flags` field calls its sub-fields "experimental".
But `exit_timeout` is now used for multiple purposes.
Solution:
Graduate `exit_timeout` to a top-level ClientConfig field.
Problem: filetype: Erlang lexical files are not recognized
Solution: Detect *.xrl files as leex filetype, include syntax and
filetype plugins (Jon Parise).
leex is the lexical analyzer generator for Erlang. Its input file format
follows a section-based structure and uses the `.xrl` file extension.
This initial work includes file detection, an ftplugin (which inherits
the Erlang configuration), and a syntax definition.
Reference:
- https://www.erlang.org/doc/apps/parsetools/leex.html
related: vim/vim#18819closes: vim/vim#18832b087c5452b
Co-authored-by: Jon Parise <jon@indelible.org>
Problem: filetype: not all Erlang files are recognized
Solution: Detect *.app.src and rebar.config files as erlang filetype
(John Parise).
*.app.src files contain Erlang application definitions. (There are also
*.app files, which are similar but more often build artifacts, and that
file extension is too ambiguous to be recognized by default.)
Reference:
- https://www.erlang.org/doc/system/applications.html
Rebar is the Erlang build tool. rebar.config uses Erlang syntax.
Reference:
- https://rebar3.org/docs/configuration/configuration/closes: vim/vim#188352b2580e61a
Co-authored-by: Jon Parise <jon@indelible.org>
Problem:
Nvim supports `textDocument/semanticTokens/full` and `…/full/delta`
already, but most servers don't support `…/full/delta` and Nvim will try
to request and process full semantic tokens response on every buffer
change. Even though the request is debounced, there is noticeable lag if
the token response is large (in a big file).
Solution:
Support `textDocument/semanticTokens/range`, which requests semantic
tokens for visible screen only.
Problem:
Remote UIs can't execute lua code when a blocking prompt is waiting for
input. This is needed when implementing IME pre-edit for example.
Solution:
Add an `nvim__exec_lua_fast` experimental API function, which is allowed
to run instead of being queued until after the message has been shown.
Problem:
Strikethrough was not enabled for vtpcon thus preventing strikethrough
text from being shown.
Solution:
Update `windows.ti`.
Co-authored-by: ymich9963 <gmichael834@gmail.com>
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>