Commit Graph

35624 Commits

Author SHA1 Message Date
zeertzjq
f1e65bde02 vim-patch:9.2.0120: tests: test_normal fails
Problem:  tests: test_normal fails
Solution: Ensure the terminal width is 40 columns and also
          check for existence of the tr.mo file

closes: vim/vim#19608

123a1e6410

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-03-09 07:05:47 +08:00
zeertzjq
504327020d vim-patch:9.1.1484: tests: Turkish locale tests fails on Mac
Problem:  tests: Turkish locale tests fails on Mac
          (after v9.1.1480)
Solution: skip the test Test_pos_percentage_in_turkish_locale() on Mac

223189389a

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-03-09 07:05:46 +08:00
Sean Dewar
137d5ab01d fix(api): merge split window config only on success
Problem: nvim_win_set_config may merge configs despite failing to configure a
split, and without applying necessary side-effects (like setting style=minimal
options). Plus, autocommands may apply a different config after the merge,
causing side-effects to apply for an outdated config.

Solution: merge configs last, only on success. Include fields only relevant to
splits. Properly set _cmdline_offset for splits.

Maybe better to disallow _cmdline_offset for splits instead, as the pum is
relative to cmdline_row anyway? (I didn't want to change behaviour too much)

Also use expect_unchanged in an unrelated test to quash a warning.
2026-03-08 19:41:33 +00:00
Sean Dewar
65a1709112 refactor(api): move split handling logic out
It was getting unwieldy.
2026-03-08 19:41:33 +00:00
Sean Dewar
f5d03ec930 fix(api): style=minimal not applied immediately for unmoved split
Problem: nvim_win_set_config with style="minimal" does not take immediate effect
when a split is not moved.

Solution: don't skip nvim_win_set_config's epilogue when only a resize may be
needed. De-duplicate resize logic and remove unnecessary redraw. (win_set*_win
already handles that)
2026-03-08 19:41:33 +00:00
altermo
72d3a57f27 feat(treesitter): incremental selection
Co-authored-by: György Andorka <gyorgy.andorka@protonmail.com>
2026-03-08 11:07:49 +01:00
Christian Clason
e8e694d837 build(deps): bump libuv to v1.52.1 2026-03-07 19:49:10 +01:00
Christian Clason
908591c61c refactor(lua): adapt to Stylua 2.4.0 2026-03-07 18:23:35 +01:00
zeertzjq
60389e1c0e vim-patch:e948fea: runtime(sed): Update syntax, support more GNU address extensions (#38193)
- Support all GNU address extensions.
- Fix some bugs related to erroneous matching of pattern delimiters in
  bracket expressions.

closes: vim/vim#19587

e948fea640

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-03-07 19:02:29 +08:00
Stefan VanBuren
d8e03d5d5a fix(treesitter): escape hyphen in lua pattern
Ref: https://github.com/neovim/neovim/pull/38140#discussion_r2897235978
2026-03-07 11:08:34 +01:00
zeertzjq
f1c82be1a1 test(shell-test): call tcdrain() on stdout and stderr on exit (#38177)
Similar to #38154, shell-test also has the same problem on FreeBSD:

FAILED
1 test, listed below:
FAILED
test/functional/terminal/ex_terminal_spec.lua @
237:
:terminal (with fake shell) executes a given command through the shell
test/functional/terminal/ex_terminal_spec.lua:239: Row 1 did not match.
Expected:
  |*^ready $ echo hi                                   |
  |*                                                  |
  |*[Process exited 0]                                |
  |                                                  |
Actual:
  |*^                                                  |
  |*[Process exited 0]                                |
  |*                                                  |
  |                                                  |
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.
Snapshot:
screen:expect([[
  ^                                                  |
  [Process exited 0]                                |
                                                    |*2
]])
stack traceback:
	test/functional/ui/screen.lua:909: in function '_wait'
	test/functional/ui/screen.lua:537: in function 'expect'
	test/functional/terminal/ex_terminal_spec.lua:239: in function <test/functional/terminal/ex_terminal_spec.lua:237>

Running the test repeatedly somehow doesn't trigger the problem, but as
mentioned in #36792 a similar problem has also happened previously.
2026-03-07 11:28:35 +08:00
luukvbaal
b6c020eb59 fix(ui2): ensure expanded cmdline is closed after :<Esc> (#38187)
Problem:  Expanded cmdline is left open after entering the cmdline again
          without entering a command that emits another message (after 301c7065).
Solution: Wait for msg_show to reinstate the vim.on_key() handler.
          If there was no message close the expanded cmdline.
2026-03-07 00:40:01 +00:00
Marc Jakobi
34a59e30db docs(api): clarify nvim_win_set_buf documentation #37201 2026-03-06 13:34:47 -05:00
luukvbaal
301c7065ca fix(ui2): only highlight Ex command lines in the cmdline #38182
Problem:  Prompts and message text (in block mode) in the cmdline are
          parsed and highlighted as if it is Vimscript.
          Entering the cmdline while it is expanded can work more like
          it does with UI1, where the press enter prompt is replaced
          and previous messages stay on the message grid, while
          subsequent messages are placed below it.
Solution: Highlight manually with string parser on lines starting with ':'.
          Spoof cmdline block mode when the cmdline is entered while it
          is expanded.
2026-03-06 13:29:20 -05:00
Yochem van Rosmalen
ac6cf5b03b fix(gen): alias /doc/user/helptag.html to /doc/user/helptag/ #38156
Problem:
helptag.html is used to search for the online help documentation of a
specified tag. The previous URL was `/doc/user/helptag.html` but that
switched to `/doc/user/helptag/` in
https://github.com/neovim/neovim.github.io/pull/437. The alias of the
.html page was added to all other doc pages but forgotten for the
helptag.html page

Solution:
Add the alias to the helptag.html page too
2026-03-06 13:20:40 -05:00
luukvbaal
fde1c07891 fix(cmdline): cmdline_block events for :lua debug.debug() #38171
Problem:  :lua debug.debug() is missing cmdline_block events.
Solution: Emit cmdline_block_show/append/hide events for :lua
          debug.debug().
2026-03-06 13:17:12 -05:00
luukvbaal
6275f533d1 fix(ui2): immediately open target windows on new tabpage (#38170)
Problem:  Previous tests for this relied on other events opening the
          targets, which are not guaranteed to happen.
Solution: Open target windows when entering a new tabpage.
2026-03-06 17:32:17 +01:00
glepnir
d19dc6339d fix(api): nvim_set_hl crashes when url= key is passed
Problem: Calling nvim_set_hl() with url= crashes because it tries to
free arena-owned string memory.

Solution: Remove the bad free and return a validation error instead.
2026-03-06 10:54:28 +01:00
glepnir
bfc7bae421 fix(health): improve version check for nightly builds #38147
Problem: nightly builds were always compared against HEAD, causing
false outdated warnings.

Solution: fetch both HEAD and refs/tags/nightly, match local commit
against HEAD first, fall back to nightly if no match.

Fix #38141
2026-03-06 07:58:42 +00:00
zeertzjq
deadff3060 test(shell-test): check MSWIN instead of _MSC_VER (#38178)
SetConsoleOutputCP() is likely needed when using MinGW as well.
It seems that zig build uses MinGW.
2026-03-06 15:11:55 +08:00
zeertzjq
2015f19f1b ci(cirrus): use parallel functionaltests (#38145)
Try this since Cirrus CI ran out of compute credits last month.

Previously the tests use less than 1 CPU out of the 2 provided by Cirrus
runner. I'm not sure if CPU usage is taken into account when counting
compute credits, or if it always fully counts the 2 CPUs. But perhaps
this will help in either case?
2026-03-06 10:05:59 +08:00
zeertzjq
066891f5d3 revert: "fix(tui): server --listen error sometimes not visible (#38027)" (#38175)
This reverts commit ab8371a26c.

Need to think of a different solution, which may require adding new
flags to nvim_ui_attach() (e.g. passing stdout or stderr fd).
2026-03-06 08:49:09 +08:00
zeertzjq
f111b954a2 Merge pull request #38176 from zeertzjq/vim-99ea2b5
vim-patch: runtime file updates
2026-03-06 08:21:48 +08:00
zeertzjq
2926668f29 vim-patch:75decb4: runtime(glimmer): add syntax support for glimmer files
In commit cdf717283 ("patch 8.2.4424: ".gts" and ".gjs" files are not
recognized", 2022-02-19) support for the glimmer file types were added.

Problem:  Syntax hilighting suppoprt was missing.
Solution: Added a glimmer syntax file that will leverage the base
          syntaxs (javascript/typescript) and include handlebars syntax
          for .gjs/.gts files.

closes: vim/vim#19569

75decb4a8d

Co-authored-by: Devin Weaver <suki@tritarget.org>
2026-03-06 07:59:43 +08:00
zeertzjq
aa9ab2e728 vim-patch:99ea2b5: runtime(handlebars): adds handlebars template syntax & indent support
The runtime had support to detect handlebars (*.hbs) files as filetype
handlebars but was lacking any indent or syntax highlighting for that
filetype.

The handlebars syntax file is also a prerequisite for the glimmer
syntax.

Permission was granted by the original author to retrofit these into the
Vim runtime. Original License (MIT) maintained in code comments.

related: vim/vim#19569

99ea2b5b06

Co-authored-by: Devin Weaver <suki@tritarget.org>
2026-03-06 07:59:15 +08:00
Maria Solano
7a8d316879 fix(lsp): update metamodel (#38174) 2026-03-05 15:15:29 -08:00
bfredl
2f07bd0c1f Merge pull request #38148 from bfredl/gnuology
fix(build): glibc 2.43 happened
2026-03-05 11:52:56 +01:00
bfredl
f0d981544b fix(build): glibc 2.43 happened
using the GNU compiler we just get a bunch of const warnings we can fix.
clang, however, gets really upset that the standard library suddenly
starts using a lot of c11 features, despite us being in -std=gnu99 mode.

Basically, _GNU_SOURCE which we set is taken as a _carte blanche_ by the
glibc headers to do whatever they please, and thus we must inform clang
that everything is still OK.
2026-03-05 10:48:25 +01:00
zeertzjq
5048d9aa2a fix(tui): call tcdrain() on stdout and stderr on exit (#38154)
Problem:
On FreeBSD, output written to TTY may be lost on exit.
Example test failure:

FAILED
test/functional/terminal/tui_spec.lua @
2521:
TUI no assert failure on deadly signal #21896
test/functional/terminal/tui_spec.lua:2523: Row 1 did not match.
Expected:
  |*Nvim: Caught deadly signal 'SIGTERM'              |
  |*                                                  |
  |*[Process exited 1]^                                |
  |*                                                  |
  |*                                                  |
  |                                                  |
  |{5:-- TERMINAL --}                                    |
Actual:
  |*                                                  |
  |*[Process exited 1]{100:^                                }|
  |*{100:~                                                 }|
  |*{100:~                                                 }|
  |*{3:[No Name]                                         }|
  |                                                  |
  |{5:-- 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.
Snapshot:
screen:expect([[
                                                    |
  [Process exited 1]{100:^                                }|
  {100:~                                                 }|*2
  {3:[No Name]                                         }|
                                                    |
  {5:-- TERMINAL --}                                    |
]])
stack traceback:
	test/functional/ui/screen.lua:909: in function '_wait'
	test/functional/ui/screen.lua:537: in function 'expect'
	test/functional/terminal/tui_spec.lua:2523: in function <test/functional/terminal/tui_spec.lua:2521>

Solution:
Call tcdrain() on stdout and stderr on exit.

This problem is only observed on FreeBSD, but it probably doesn't hurt
to do this on all platforms with termios.h. In fact using tcdrain() on
PTY slave is no-op on Linux according to Linux kernel source code.
2026-03-05 10:48:07 +08:00
Lewis Russell
8bfb91accc fix(lsp): ignore stale codelens resolve responses (#38153) 2026-03-04 17:43:40 -08:00
zeertzjq
843bc1aa8d vim-patch:9.2.0108: byteidx_common() and f_utf16idx() call ptr2len() twice (#38159)
Problem:  byteidx_common() and f_utf16idx() are calling ptr2len() twice
          per iteration, instead of reusing the already computed clen.
Solution: Reuse clen for pointer advancement in both functions
          (Yasuhiro Matsumoto).

closes: vim/vim#19573

499e93d09a

N/A patches:
vim-patch:9.2.0109: VIM_BACKTICK is always defined except for tiny builds

Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
2026-03-05 07:54:10 +08:00
zeertzjq
16fbde83c4 fix(checkhealth): don't wrap command in cmd.exe (#38158)
This was introduced in #6608 and is unnecessary since #9516 and #31109.
2026-03-05 07:51:24 +08:00
Christian Clason
6beb1fe0cd build(deps): bump luajit to 659a61693 2026-03-04 19:11:58 +01:00
Stefan VanBuren
01817eb6f3 fix(treesitter): normalize language aliases
Hyphenated language names are silently dropped when used as injections
(see #38132).

This combines the normalization of language aliases into `resolve_lang`,
and also adds the normalization of hyphens to underscores, which allows
for handling of injected language tags with hyphens in their names.

Fixes #38132.
2026-03-04 17:15:59 +01:00
bfredl
6535353b6d Merge pull request #38128 from bfredl/neodamage
refactor(marktree): use better structure for damaged pairs after splice
2026-03-04 09:04:32 +01:00
zeertzjq
3b621d4180 Merge pull request #38146 from zeertzjq/vim-9.2.0091
vim-patch:9.2.{0091,0097,0106}
2026-03-04 09:36:27 +08:00
zeertzjq
a22c699ecb vim-patch:9.2.0106: memory leak in expand_findfunc()
Problem:  memory leak in expand_findfunc() (after v9.1.0811)
Solution: Free list variable l on early return (Huihui Huang).

closes: vim/vim#19564

648240fe9a

N/A patches:
vim-patch:9.2.0105: memory leak in heredoc_get() in src/evalvars.c

Co-authored-by: Huihui Huang <625173@qq.com>
2026-03-04 09:13:56 +08:00
zeertzjq
0676503ab5 vim-patch:9.2.0097: Memory leak in qf_push_dir()
Problem:  Memory leak in qf_push_dir() (after v9.2.0091)
Problem:  free dirname, if it is not a directory.

closes: vim/vim#19552

e352bb632a

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-03-04 09:09:50 +08:00
zeertzjq
0cfeedb088 vim-patch:9.2.0091: missing out-of-memory checks in quickfix.c
Problem:  missing out-of-memory checks in quickfix.c
Solution: Improve error handline, refactor qf_push_dir() slightly
          (John Marriott).

closes: vim/vim#19528

0155401538

Co-authored-by: John Marriott <basilisk@internode.on.net>
2026-03-04 09:07:29 +08:00
zeertzjq
813457d5a6 build: adjust parallel functionaltest target names (#38144)
- Use double underscores for the group targets as these targets usually
  shouldn't be used directly.
- Use dash instead of underscore in the two targets that need to be used
  directly. I'm not entirely sure about this, as both chars are used in
  many targets, but a dash is easier to type than an underscore.
2026-03-04 08:53:20 +08:00
Evgeni Chasnovski
f00abc6a56 fix(pack): ensure data spec is passed in events during lockfile sync #38139
Problem: During initial "bootstrap" via lockfile synchronization, the
  whole plugin specification is reconstructed from the lockfile data,
  ignoring potential user changes added in the first `vim.pack.add()`.
  This is enough in most situations since it is the only data needed
  for actual installation.

  However, this affects specification passed to `PackChanged[Pre]`
  events. In particular, `data` field is missing which can be a problem
  if there is a `PackChanged kind=install` hook that uses that field
  (like with some kind of `build` method used during install).
  And there might be different `version` set in `vim.pack.add()`.

Solution: Pass the `specs` input of the first `vim.pack.add()` down to
  lockfile synchronization and use it to reconstruct plugin
  specification for the to-be-installed plugin. If present among the
  user's `specs`, it is used but with forced `src` from the lockfile (as
  it is the one used during installation).

  Note that this still has a caveat when using separate
  `vim.pack.add()`, as only the specs from the first input (when the
  lockfile synchronization happens) is taken into account.
2026-03-03 19:16:24 -05:00
zeertzjq
6ddcc84a6c vim-patch:9.2.0102: 'listchars' "leadtab" not used in :list (#38142)
Problem:  'listchars' "leadtab" not used in :list (after 9.2.0088).
Solution: Also check for "leadtab" when using :list. Fix memory leak on
          E1572 if "multispace" or "leadmultispace" is set (zeertzjq).

closes: vim/vim#19557

5845741d69
2026-03-03 23:42:05 +00:00
Sean Dewar
1901832f26 fix(api): return "style" in nvim_win_get_config() #38122
Problem: nvim_win_get_config() does not return a window's "style".

Solution: always include it, and document `style=""`.

Always included so it can be used reciprocally with nvim_open_win() or
nvim_win_set_config(). (otherwise the config of a window with kWinStyleUnused
will not unset the kWinStyleMinimal style of another window if passed to
nvim_win_set_config, for example)
2026-03-03 12:17:20 +00:00
glepnir
84d84e9b5b fix(window): style=minimal window loses local options when switching buffers #38138
Problem: 5943a81 skips saving window options in `buflist_altfpos` for
style=minimal windows, which also prevents the window from restoring its own
options when switching buffers.

Solution: revert the change. In `get_winopts`, don't restore options from the
`WinInfo` of style=minimal windows when reusing values for a different window.
In `win_free`, clear `wi_optset` for minimal windows.
2026-03-03 11:51:58 +00:00
bfredl
00e51d2d1c refactor(marktree): use better structure for damaged pairs after splice
Previous implementation used a full sort but this is unnecessary. Pairs
do not need to be processed in id-order, all that we did was make
"start" and "end" marks find each other. This can be done with a hash
table instead. The "grow only" khash_t mentioned in the TODO is
the since long merged #24985 5970157e refactor with dense value array,
to not regress on memory locality.
2026-03-03 11:23:20 +01:00
zeertzjq
b23d00ce99 vim-patch:partial:9.2.0096: has() function is slow due to linear feature scan (#38135)
Problem:  The has() function is slow because it performs a linear scan
          of the feature list for every call.
Solution: Move common runtime checks and the patch-version parser to the
          beginning of the f_has() function (Yasuhiro Matsumoto).

closes: vim/vim#19550

327e0e34c9

Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
2026-03-03 09:57:21 +08:00
zeertzjq
b4274b73f3 vim-patch:99ba87d: runtime(nickel): Add filetype plugin with com, cms settings (#38134)
closes: vim/vim#19545

99ba87d152

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2026-03-03 09:36:15 +08:00
zeertzjq
aeddd66a2a Merge pull request #38133 from zeertzjq/vim-9.2.0088
vim-patch:9.2.{0088,0090}: 'listchars' "leadtab"
2026-03-03 09:35:26 +08:00
zeertzjq
f1c57b39fd vim-patch:73f4162: runtime(doc): Tweak doc style in options.txt
73f41626df

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2026-03-03 08:24:15 +08:00
zeertzjq
518aa46158 vim-patch:9.2.0090: "leadtab" behavior inconsistent on line with only TABs
Problem:  "leadtab" behavior inconsistent on line with only TABs
          (after 9.2.0088).
Solution: Don't consider those as leading TABs. Also add more tests for
          existing behavior of "lead" and "leadmultispace" (zeertzjq).

closes: vim/vim#19549

4b30e40a1f
2026-03-03 08:08:20 +08:00