Commit Graph

35472 Commits

Author SHA1 Message Date
marvim
4a7c621cf8 docs: update version.c
vim-patch:9.1.0001: tests: Test_popup_setbuf() fails
vim-patch:9.2.0018: high cpu usage with Wayland compositor
vim-patch:472f46e23 README.md: mention r/vim and #vim libera
vim-patch:dbd924f6a runtime(syntax-tests): Fail when executable syntax tests are found
vim-patch:70a9273dc Filelist: Fix CI error caused by xdg.vim missing in Filelist
vim-patch:405ba5010 runtime(doctags): remove unused header include file
vim-patch:47eb32fc9 translation(zh): Update menu translation for changed "Sponsor" entry
2026-02-20 03:53:00 +00:00
zeertzjq
94c21c22dc Merge pull request #37979 from zeertzjq/vim-9.2.0027
vim-patch: runtime file updates
nightly
2026-02-20 09:46:37 +08:00
zeertzjq
93a8acb1b8 vim-patch:9.2.0033: filetype: sh filetype used for env files
Problem:  filetype: sh filetype used for env files
Solution: Detect *.env and .env.* files as env filetype,
          detect .envrc and .envrc.* as sh filetype,
          include a simple env syntax script (DuckAfire)

Previously, .env files were handled by the shell syntax. While
functional, this limited the ability to support specific .env
implementations, such as CodeIgniter4 which allows dots in keys
(e.g., "foo.bar=0").

The new dedicated 'env' filetype and syntax script improves legibility
and prevents highlighting from breaking when encountering spaces.
Currently, the syntax does not support indentation; fields, variables,
and comments must start at the beginning of the line.

closes: vim/vim#19260

d0fa375629

Co-authored-by: DuckAfire <155199080+duckafire@users.noreply.github.com>
2026-02-20 09:26:07 +08:00
zeertzjq
595b4cc48e vim-patch:4611f7b: runtime(apache): Add 'SSLVHostSNIPolicy' declaration to syntax script
The declaration 'SSLVHostSNIPolicy' has bee introduced in version 2.4.66.

closes: vim/vim#19452

4611f7b656

Co-authored-by: Michael Osipov <michael.osipov@innomotics.com>
2026-02-20 09:18:13 +08:00
zeertzjq
c67248988b vim-patch:342ae5f: runtime(progress): Use setlocal for expandtab
The Progress syntax file gained `set expandtab` in 4c3f536f4 (updated
for version 7.0d01, 2006-04-11). The Progress language itself doesn't
distinguish between tabs and spaces for indentation, so this seems like
something that should be left to user preference; but the setting is
accompanied by the comment "The Progress editor doesn't cope with tabs
very well", so there may be reason to keep it.

However, using `set` means that any new buffers created after editing a
Progress file will also have `expandtab` turned on, which is likely
contrary to a user's expectations. We should use `setlocal` instead to
avoid this.

closes: vim/vim#19458

342ae5f8aa

Co-authored-by: Daniel Smith <daniel@rdnlsmith.com>
2026-02-20 09:17:57 +08:00
zeertzjq
c78e276881 vim-patch:9.2.0027: filetype: yara files are not recognized
Problem:  filetype: yara files are not recognized
Solution: Detect *.yara and *.yar files as yara filetype
          (Thomas Dupuy).

Reference:
- https://github.com/VirusTotal/yara
- https://github.com/VirusTotal/yara-x

closes: vim/vim#19460

7d93ae57f0

Co-authored-by: Thomas Dupuy <thom4s.d@gmail.com>
2026-02-20 09:17:46 +08:00
zeertzjq
8c22ba8b79 Merge pull request #37978 from zeertzjq/vim-9.2.0030
vim-patch:9.2.{0030,0032}
2026-02-20 09:15:45 +08:00
zeertzjq
6e8a1a8988 vim-patch:9.2.0032: completion: hang with line completion and fuzzy
Problem:  completion: hang with line completion and fuzzy (Jesse Pavel)
Solution: Only check the line number when wrapping around the file
          (Hirohito Higashi).

fixes:  vim/vim#19434
closes: vim/vim#19443

d8648f7279

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2026-02-20 09:01:20 +08:00
zeertzjq
08b8fe5ab3 vim-patch:9.2.0030: completion: non-prefix matches shown when leader is NULL
Problem:  When 'autocomplete' fires before compl_leader is initialized,
          the prefix filter is bypassed. This allows non-prefix matches
          (e.g. from fuzzy omnifuncs) to be shown in the popup menu and
          incorrectly preinserted.
Solution: In get_leader_for_startcol(), if compl_leader.string is NULL,
          fall back to using compl_orig_text as a filter for matches
	  starting at or after the completion column (Hirohito Higashi).

When 'autocomplete' first fires, compl_leader is NULL because
ins_compl_start() has not set it yet.  This caused the prefix filter in
ins_compl_build_pum(), find_next_completion_match() and
find_common_prefix() to be bypassed, allowing non-prefix fuzzy omnifunc
matches to appear in the PUM and be preinserted.

Extend get_leader_for_startcol() to fall back to compl_orig_text when
compl_leader.string is NULL: if the match's cpt source startcol is less
than compl_col the match includes pre-compl_col text, so return
&compl_leader (NULL string) to signal "pass through"; otherwise return
&compl_orig_text so callers filter by the original text.  The compl_col
<= 0 guard is kept only for the prepend-text path to avoid it
interfering with the NULL-leader fallback when compl_col is zero.

With this change all callers of get_leader_for_startcol() automatically
receive the correct filter string without additional helpers.

Also update Test_autocomplete_trigger Test 9 to reflect the new
behavior: 'faberge' is no longer shown when completing 'foo' because
it does not start with the current prefix.

Add Test_autocomplete_preinsert_null_leader() to verify that only
prefix-matching candidates appear in the PUM and are preinserted.

fixes:  vim/vim#19328
closes: vim/vim#19447

a04ae0210b

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 08:58:41 +08:00
zeertzjq
e3d46a6337 test: start test runners in Xtest_xdg dir (#37964)
This is a better way to prevent parallel tests from interfering with
each other, as there are many ways files can be created and deleted in
tests, so enforcing different file names is hard.

Using $TMPDIR can also work in most cases, but 'backipskip' etc. have
special defaults for $TMPDIR.

Symlink runtime/, src/, test/ and README.md to Xtest_xdg dir to make
tests more convenient (and symlinking test/ is required for busted).

Also, use README.md instead of test/README.md in the Ex mode inccommand
test, as test/README.md no longer contains 'N' char.
2026-02-20 06:53:33 +08:00
zeertzjq
785ac9f228 vim-patch:9.2.0028: matchadd() conceal may use unrelated syntax cchar (#37974)
Problem:  matchadd() conceal may use unrelated syntax cchar.
Solution: Only use syntax cchar when syntax_flags has HL_CONCEAL
          (zeertzjq).

closes: vim/vim#19459

d01f234ec1
2026-02-19 22:51:31 +00:00
luukvbaal
2de284e50b fix(message): set replace_last for completion "scanning" messages #37967
Problem:  UIs put ins-completion "scanning" messages one after another,
          which are meant to overwrite the previous message.
Solution: Ensure the msg_show "replace_last" parameter is set.
2026-02-19 16:01:43 -05:00
zeertzjq
dec3c6fa34 test(lsp): fix fake LSP server timeout not working (#37970)
Problem:  Fake LSP server does not timeout or respond to SIGTERM as it
          does not run the event loop.
Solution: Instead of io.read(), use stdioopen()'s on_stdin callback to
          accumulate input and use vim.wait() to wait for input.

Also, in the test suite, don't stop a session when it's not running, as
calling uv.stop() outside uv.run() will instead cause the next uv.run()
to stop immediately, which cancels the next RPC request.
2026-02-19 10:38:14 -08:00
zeertzjq
08f4811061 fix(treesitter): :InspectTree wrong title for non-relative path #37965
Problem:  :InspectTree sets wrong title for file with non-relative path.
Solution: Use full path if relpath() returns nil.
2026-02-19 12:05:48 -05:00
Evgeni Chasnovski
9567fb0507 fix(defaults): silent gx if no textDocument/documentLink support #37969
Problem: If buffer has attached LSP servers and none of them supports
  `textDocument/documentLink` method, typing `gx` results in a warning
  about that.

Solution: Explicitly check that at least one server supports the target
  method before making the LSP request.
2026-02-19 06:59:00 -05:00
zeertzjq
f0137bf443 test(terminal/channel_spec): fix test still flaky on Windows (#37968)
FAILED   1 test, listed below:
FAILED   test/functional/terminal/channel_spec.lua @ 133: chansend sends lines to terminal channel in proper order
test/functional/terminal\channel_spec.lua:141: retry() attempts: 3
test/functional/terminal\channel_spec.lua:143: Failed to match any screen lines.
Expected (anywhere): "echo "hello".*echo "world""
Actual:
  |^PowerShell 7.4.13                                                                                   |
  |PS D:\a\neovim\neovim> {UNEXPECTED foreground = tonumber('0xffff40'), fg_indexed = true:echo }{UNEXPECTED foreground = tonumber('0x00e0e0'), fg_indexed = true:"hello"}                                                                 |
  |hello                                                                                               |
  |PS D:\a\neovim\neovim> {UNEXPECTED foreground = tonumber('0xffff40'), fg_indexed = true:echo }{UNEXPECTED foreground = tonumber('0x00e0e0'), fg_indexed = true:"world"}                                                                 |
  |{UNEXPECTED foreground = Screen.colors.Gray88, fg_indexed = true:>> }                                                                                                 |
  |world                                                                                               |
  |PS D:\a\neovim\neovim> {UNEXPECTED foreground = tonumber('0xffff40'), fg_indexed = true:echo }{UNEXPECTED foreground = tonumber('0x00e0e0'), fg_indexed = true:"hello"}                                                                 |
  |{UNEXPECTED foreground = Screen.colors.Gray88, fg_indexed = true:>> }                                                                                                 |
  |hello                                                                                               |
  |PS D:\a\neovim\neovim> {UNEXPECTED foreground = tonumber('0xffff40'), fg_indexed = true:echo }{UNEXPECTED foreground = tonumber('0x00e0e0'), fg_indexed = true:"world"}                                                                 |
  |{UNEXPECTED foreground = Screen.colors.Gray88, fg_indexed = true:>> }                                                                                                 |
  |world                                                                                               |
  |PS D:\a\neovim\neovim> {UNEXPECTED foreground = tonumber('0xffff40'), fg_indexed = true:echo }{UNEXPECTED foreground = tonumber('0x00e0e0'), fg_indexed = true:"hello"}                                                                 |
  |{UNEXPECTED foreground = Screen.colors.Gray88, fg_indexed = true:>> }                                                                                                 |
  |hello                                                                                               |
  |PS D:\a\neovim\neovim> {UNEXPECTED foreground = tonumber('0xffff40'), fg_indexed = true:echo }{UNEXPECTED foreground = tonumber('0x00e0e0'), fg_indexed = true:"world"}                                                                 |
  |{UNEXPECTED foreground = Screen.colors.Gray88, fg_indexed = true:>> }                                                                                                 |
  |world                                                                                               |
  |{1:term://D:\a\neovim\neovim//9056:pwsh.exe -nop [-]                                                   }|
  |                                                                                                    |
2026-02-19 19:31:33 +08:00
zeertzjq
2605ce9377 test: fix flaky tests in terminal/{buffer,channel}_spec.lua (#37966)
In buffer_spec.lua, wait for a bit more than the refresh delay.
In channel_spec.lua, retry sending lines on Windows.
2026-02-19 17:57:02 +08:00
zeertzjq
76db55c137 test(ex_cmds/write_spec): don't create files under test/ (#37963) 2026-02-19 06:30:26 +00:00
zeertzjq
ea3942f222 test: remove duplicate test file 078_swapfile_recover_spec.lua (#37961)
This is now covered by Test_swap_file() in test_recover.vim.
2026-02-19 04:14:39 +00:00
zeertzjq
e98a6979ee vim-patch:9.2.0025: filetype: cshtml incorrectly recognized (#37957)
Problem:  filetype: cshtml incorrectly recognized, razor files are not
          recognized
Solution: Detect *.cshtml and *.razor files as razor filetype
          (tris203)

Reference:
https://learn.microsoft.com/en-us/aspnet/core/mvc/views/razor?view=aspnetcore-10.0

closes: vim/vim#19207

68dbb58d51

Co-authored-by: tris203 <admin@snappeh.com>
2026-02-19 02:46:27 +00:00
zeertzjq
e142e01d57 fix(rpc): include write failure reason in log (#37959)
Also don't use LOGLVL_ERR on UV_EPIPE.
2026-02-19 10:34:22 +08:00
Maria Solano
c3589753a0 fix(lsp): add vim.deprecate call to vim.lsp.with (#37960) 2026-02-18 18:16:03 -08:00
zeertzjq
336469ff2d Merge pull request #37958 from zeertzjq/vim-9.2.0023
vim-patch:9.2.{0023,0024}
2026-02-19 09:05:06 +08:00
zeertzjq
fadf5fc8db vim-patch:9.2.0024: Reading files with very long lines crashes with a segfault
Problem:  Reading files with lines approaching MAXCOL length crashes
          with segfault due to colnr_T overflow.
Solution: The split check 'linerest >= MAXCOL' fired too late because
          linerest could grow by up to 'size' bytes before the next
          check. Change threshold to 'linerest >= MAXCOL - size' to
          ensure the line passed to ml_append() stays within colnr_T
          range.

Note: supported by AI claude

fixes:   vim/vim#17935
closes:  vim/vim#18953
closes:  vim/vim#19332

6cc291da06

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-02-19 08:19:44 +08:00
zeertzjq
134782b99e vim-patch:9.2.0023: fix integer overflow in ml_append_int() for long lines
Problem:  ml_append_int() crashes when appending lines near MAXCOL
          length due to signed integer overflow in space_needed
          calculation.
Solution: Change 'space_needed' from int to long to handle the
          'len + INDEX_SIZE' computation without overflow. Update
          db_free comparison casts from (int) to (long) to match.

Note: supported by AI claude

related: vim/vim#17935
related: vim/vim#18953
related: vim/vim#19332

0ece393844

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-02-19 08:19:44 +08:00
zeertzjq
6877fef972 vim-patch:89712b9: runtime(ccomplete): handle structs from tags file (#37956)
fixes: vim/vim#7292

89712b9f0e

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-02-19 00:18:55 +00:00
zeertzjq
ac84a3f3b6 vim-patch:9.2.0020: Wrong shortened buffer after :cd with duplicate slashes (#37955)
Problem:  Wrong shortened buffer name after :cd with duplicate slashes.
Solution: Skip over multiple consecutive path separators (zeertzjq).

related: neovim/neovim#37080
closes:  vim/vim#19444

f245e17ac7

N/A patches:
vim-patch:9.0.1859: heap-use-after-free in bt_normal()
vim-patch:9.2.0022: bt_quickfix() is slow
2026-02-19 07:46:10 +08:00
zeertzjq
d74e927310 test: remove XDG dir and rplugin manifest on cleanup (#37954) 2026-02-18 23:43:13 +00:00
zeertzjq
2154d325d5 fix(memfile): avoid potential crash on OOM (#37946)
When running out of memory in a libuv callback, try_to_free_memory()
will call mf_release_all(). In this case, mf_sync() cannot call
os_breakcheck() as it'll run the libuv loop recursively, so check
main_loop.recursive to prevent that.

Also fix another possible problem that a terminal buffer may have a
swapfile when encountering an OOM in e.g. terminal_alloc().
2026-02-19 06:07:16 +08:00
Bartłomiej Maryńczak
761fbc155a test(lsp): add entire-line completion word case (#37927)
Problem:
Multiword completion items used to be cut at a first word.

Solution:
Add a test that ensures this does not regress in the future
2026-02-18 13:13:38 -08:00
Maria Solano
6fe68abdf5 fix(lsp): use entire line as completion word (#37949) 2026-02-18 11:40:34 -08:00
Justin M. Keyes
0e4fa55200 Merge #37928 prompt-buffer cursor, undo 2026-02-18 14:19:25 -05:00
Christian Clason
4b14ba5258 ci(deps): don't brew install ninja on macOS
Problem: `install_deps.sh` tries to install `ninja` on macOS, but it is
installed on the runners by default, triggering warnings (and wasting
time) on CI.

Solution: Don't `brew install ninja`.
2026-02-18 19:39:31 +01:00
Christian Clason
3bdebfb87f feat(defaults): don't enable treesitter query linter
This was added before there was a dedicated language server for
tree-sitter queries. Now that https://github.com/ribru17/ts_query_ls
exists, this is a better option in every regard (and up to now
required manually disabling the builtin linter to avoid duplicate
diagnostics and performance issues).
2026-02-18 18:06:35 +01:00
Justin M. Keyes
abfe6c9ef7 feat(logging): rename ".nvimlog" => "nvim.log" #37935
- Rename ".nvimlog" to "nvim.log"
  - doesn't need to be "hidden"/dotfile
  - ".log" extension helps with filetype detection
- Also rename "nvim/log" => "nvim/nvim.log"
2026-02-18 11:58:34 -05:00
zeertzjq
d23f28cca2 test(win_scrolled_resized_spec): fix flaky test (#37942) 2026-02-18 21:10:22 +08:00
zeertzjq
d0c699ec7b test(screen): fix minimal timeout too small for "intermediate" (#37933)
After #27620 flags.timeout is no longer used as the minimal timeout for
"intermediate", but the default minimal timeout shouldn't be too small.
2026-02-18 19:10:08 +08:00
zeertzjq
a520d9c4ea test: fix test failure causing following tests to fail (#37932) 2026-02-18 17:08:08 +08:00
bfredl
fa9e071b83 Merge pull request #37826 from glepnir/hl_underline_int_overflow
fix(highlight): blend underline check and use 64-bit key for attr cache to support 32-bit attr values
2026-02-18 09:46:41 +01:00
Olivia Kinnear
6bb6b47933 fix(lsp): wait to display exit message #37925 2026-02-18 03:03:20 -05:00
zeertzjq
496eca22b3 test: support running functionaltests in parallel by directory (#37918)
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.
2026-02-18 15:56:50 +08:00
Rahul Yedida
9492df027d fix(defaults): 'guifont' "monospace" fallback, trim spaces #37930
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.
2026-02-18 01:57:59 -05:00
github-actions[bot]
456fb08542 docs: update version.c #37784
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
2026-02-18 01:53:15 -05:00
Sean Dewar
a5eb023a53 fix(prompt): clear undo when changing/appending prompt
Problem: undoing after the prompt is changed breaks it (and causes init_prompt
to abort it and append a new one), as the undo history contains the old prompt.

Solution: like submitting, clear the undo buffer. Don't do it in init_prompt if
the line was empty; that may not result in a new prompt, and causes commands
like "S" to lose the history.

As u_save, etc. wasn't being called by prompt_setprompt, undoing after it fixes
the prompt usually gave undesirable results anyway.

Remove the added undo_spec.lua test, as its approach no longer works as a repro,
and finding a new one seems fiddly.
2026-02-17 23:43:37 +00:00
Sean Dewar
602cbbe1d9 fix(prompt): prompt_setprompt cursor col adjustment
Problem: prompt_setprompt adjusted cursor col may be negative (<=0 when
1-based), and doesn't check the col of ':

Solution: avoid negative col and adjust correctly if ': col differs from old
prompt's length.
2026-02-17 23:43:05 +00:00
luukvbaal
29a46a11aa fix(ui2): don't change configured message target implicitly #37924
Problem:  Implicitly setting message target when 'cmdheight' changes.
Solution: Just use the user configured target. Support "cmd" target
          with 'cmdheight' set to 0.
2026-02-17 13:12:49 -05:00
zeertzjq
f3feae0bbf fix(terminal): crash after deleting buffer lines (#37921)
Problem:  Terminal crashes after deleting buffer lines.
Solution: Don't insert lines above lines 0.
2026-02-17 13:00:13 +00:00
glepnir
bd12aef784 fix(highlight): refresh highlight attrs before message output #25737
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().
2026-02-17 07:59:07 -05:00
Justin M. Keyes
73c4472d4a Merge #37913 prompt-bufffer, u_savecommon 2026-02-17 07:40:19 -05:00
zeertzjq
4f6b3e5c15 fix(terminal): spurious buffer update with empty buf (#37920)
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.
2026-02-17 20:30:34 +08:00