Commit Graph

29989 Commits

Author SHA1 Message Date
e96f75a4e6 NVIM 0.10.4
This is maintenance release, focusing on bug fixes. It also contains changes
to the available binary releases.

A Linux AArch64 binary has been added as part of the binary releases.
In addition, the previous "linux64" binary has been renamed to "linux-x86_64".
This is a BREAKING changes for scripts which consumes our binary releases.

FIXES
--------------------------------------------------------------------------------
- a8eddf1eb1 checkhealth: failed if 'lua' in plugin name
- 2bc5e1be0f decor: set invalid flag for end of invalidated paired marks
- d8149e5af9 inspect: use correct default highlight
- 357ee88606 jobs: do not block UI when jobwait() doesn't block (#31803)
- b0b383bff9 lsp: minimum height for floating popup #31990
- 4b25fe09cc lua: prevent SIGSEGV when lua error is NULL in libuv_worker (#32091)
- e477ac7c45 marks: revise metadata for start mark of revalidated pair #32017
- 22a327a20e mpack: remove invalid bool definition
- 87440e7bc5 runtime: let matchit and matchparen skips fallback on treesitter captures
- f132efaefb search: avoid quadratic time complexity when computing fuzzy score (#32153)
- ca10442e01 treesitter: don't open fold when o/O adds a line below #28709
- 323c43e1c4 treesitter: uv_dlclose after uv_dlerror
- a3cc513b67 treesitter.foldexpr: only refresh valid buffers
- a986048cb0 treesitter.foldexpr: refresh in the buffers affected by OptionSet
- d7ee06124d treesitter.foldexpr: robustness against ctrl-c
- 79030bf196 ui: ensure screen update before waiting for input #30576
- 3a50639331 9.1.0699: "dvgo" is not always an inclusive motion (#30173)
- 6a6c6b2658 9.1.0708: Recursive window update does not account for reset skipcol (#30217)
- 938a600847 9.1.1048: crash after scrolling and pasting in silent Ex mode (#32168)

BUILD
--------------------------------------------------------------------------------
- fdcdf560da release: add linux-arm64 appimage and tarball
- a7392c04d9 tests: add arm64 runner
v0.10.4
2025-01-29 11:10:58 +01:00
8d420a32db ci(release)!: remove backwards compatible releases
Remove `nvim-linux64.tar.gz` and `nvim.appimage` as maintaining
these is too much work.

Also fix directory names to be consistent.

(cherry picked from commit 318676ad13)
2025-01-28 11:12:21 +01:00
fdcdf560da ci(release): add linux-arm64 appimage and tarball
Problem: No releases for ARM Linux.

Solution: Provide appimages and tarballs for `linux-arm64`. Rename
x86 releases to `linux-x86_64` for consistency.

(cherry picked from commit c1718d6863)
2025-01-28 11:12:21 +01:00
22a327a20e fix(mpack): remove invalid bool definition
This causes build failures with gcc 15.

Fixes #31723

(cherry picked from commit 83479b95ab)
2025-01-28 03:33:12 +00:00
d63848c918 Merge pull request #32197 from zeertzjq/backport
ci(tests): add arm64 runner
2025-01-28 11:16:55 +08:00
a6c54fdfc1 ci(tests): remove build-types jobs
Problem: Some CI jobs are redundant: `RelWithDebInfo` is already tested
on Linux-Arm64; `MinSizeRel` and Ninja Multi Config are not sufficiently
relevant in practice to spend CI cycles on.

Solution: Remove `build-types` job.
(cherry picked from commit 0fd4ef5da7)
2025-01-25 08:28:06 +08:00
a7392c04d9 ci(tests): add arm64 runner
Problem: Linux `aarch64`/`arm64` builds are not tested.

Solution: Add `ubuntu-arm` runners to test matrix (using
`RelWithDebInfo` build).

(cherry picked from commit 3702bcb139)
2025-01-25 08:27:55 +08:00
7908900859 docs(support): update tested macOS and FreeBSD versions (#32191) 2025-01-24 10:07:05 +00:00
a8eddf1eb1 fix(checkhealth): failed if 'lua' in plugin name
(cherry picked from commit 4c9f3689a1)
2025-01-23 08:25:31 +00:00
938a600847 vim-patch:9.1.1048: crash after scrolling and pasting in silent Ex mode (#32168)
Problem:  Crash after scrolling and pasting in silent Ex mode.
          (fizz-is-on-the-way)
Solution: Don't move cursor to line 0 when scrolling.
          (zeertzjq)

closes: vim/vim#16506

df098fedbc
(cherry picked from commit a9c12d4c29)
2025-01-23 00:36:43 +00:00
3a50639331 vim-patch:9.1.0699: "dvgo" is not always an inclusive motion (#30173)
Problem:  "dvgo" is not always an inclusive motion
          (Iain King-Speir)
Solution: initialize the inclusive flag to false

fixes: vim/vim#15580
closes: vim/vim#15582

f8702aeb8f

Co-authored-by: Christian Brabandt <cb@256bit.org>
(cherry picked from commit 0346666f71)
2025-01-22 07:17:20 +00:00
f132efaefb fix(search): avoid quadratic time complexity when computing fuzzy score (#32153)
(cherry picked from commit a8b6fa07c4)
2025-01-22 01:54:04 +00:00
46cc8a52b2 Merge pull request #32102 from tomtomjhj/cherrypick-ts-foldexpr
Backport treesitter foldexpr fixes
2025-01-19 11:31:47 -08:00
a3cc513b67 fix(treesitter.foldexpr): only refresh valid buffers
Problem: autocmd to refresh folds always uses the current buffer if the
option type is local. However, the current buffer may not have a parser,
and thus the assert that checks for a parser could fail.

Solution: check if the foldinfo contains the buffer, and only refresh if
so.
2025-01-20 00:27:42 +09:00
a986048cb0 fix(treesitter.foldexpr): refresh in the buffers affected by OptionSet 2025-01-20 00:27:39 +09:00
d7ee06124d fix(treesitter.foldexpr): robustness against ctrl-c
Problem:
Exiting the insert mode with ctrl-c does not trigger InsertLeave
autocmd. This may lead to nil error in treesitter foldexpr.

Solution:
Check nil. Folds still can be stale after exiting the insert mode with
ctrl-c, but it will be eventually updated correctly.

An alternative solution would be to ensure that exiting the insert mode
always triggers do_foldupdate. This can be done either by "fixing"
ctrl-c or with on_key callback that checks ctrl-c (nvim-cmp does this).
2025-01-20 00:26:52 +09:00
ca10442e01 fix(treesitter): don't open fold when o/O adds a line below #28709
Problem:
`o`-ing on a folded line opens the fold, because the new line gets the
fold level from the above line (level '='), which extends the fold to
the new line. `O` has a similar problem when run on the line below a
fold.

Solution:
Use -1 for the added line to get the lower level from the above/below
line.
2025-01-20 00:26:03 +09:00
4b25fe09cc fix(lua): prevent SIGSEGV when lua error is NULL in libuv_worker (#32091)
Problem:
Calling `xstrdup` with a NULL pointer causes a SIGSEGV if `lua_tostring` returns
NULL in `nlua_luv_thread_common_cfpcall`.

Crash stack trace:
- `_platform_strlen` → `xstrdup` (memory.c:469)
- `nlua_luv_thread_common_cfpcall` (executor.c:281)

Solution:
Check if `lua_tostring` returns NULL and pass NULL to `event_create` to avoid the crash.

(cherry picked from commit a5b1b83a26)

Co-authored-by: 林玮 (Jade Lin) <linw1995@icloud.com>
2025-01-19 01:00:18 +00:00
baaaf6a9e7 build: fix install 2025-01-15 21:27:02 +01:00
e477ac7c45 fix(marks): revise metadata for start mark of revalidated pair #32017
Problem:  Metadata may be revised for end mark of a revalidated pair.
Solution: Revise metadata for start mark of a revalidated pair.
(cherry picked from commit 5cc93ef472)
2025-01-15 10:56:52 +00:00
3b5c2213fd build: fix make install on cmake 3.13 and 3.14
Closes https://github.com/neovim/neovim/issues/30756.
2025-01-15 09:33:30 +01:00
5aabe5695f Update test/functional/plugin/lsp_spec.lua 2025-01-14 12:36:42 +00:00
b0b383bff9 fix(lsp): minimum height for floating popup #31990
Problem:
The floating window for hover and signature help always cuts off a few lines,
because the `_make_floating_popup_size` function counts empty lines as having
zero height.

Solution:
Ensure the height is at least 1.

(cherry picked from commit a4f575abd8)
2025-01-14 12:36:42 +00:00
323c43e1c4 fix(treesitter): uv_dlclose after uv_dlerror
(cherry picked from commit 5a54681025)
2025-01-14 09:48:10 +00:00
2bc5e1be0f fix(decor): set invalid flag for end of invalidated paired marks
(cherry picked from commit 87610d82db)
2025-01-10 07:41:32 +00:00
87440e7bc5 fix(runtime): let matchit and matchparen skips fallback on treesitter captures
When treesitter is enabled, by default syntax groups are not defined, but these
groups are used to identify where to skip matches in matchit and matchparen.

This patch does three things:
1. If syntax is enabled regardless of treesitter (`vim.bo.syntax='on'`):
   Use original implementation.
2. If treesitter is enabled and syntax is not:
   Match the syntax groups (i.e. `comment\|string`) against treesitter captures
   to check for skipped groups.
3. Add an explicit treesitter syntax for marking captures to skip:
   matchit uses `b:match_skip` to determine what counts as skippable
   Where 's:comment\|string' uses a match of the named syntax groups against
   a regex match of comment\|string, 't:comment\|string' now uses vim regex
   to match against the names of the treesitter capture groups.

(cherry picked from commit 69aa33d890)
2025-01-04 19:48:25 +00:00
357ee88606 fix(jobs): do not block UI when jobwait() doesn't block (#31803)
(cherry picked from commit efe1732c6f)
2025-01-03 17:16:40 +00:00
6a6c6b2658 vim-patch:9.1.0708: Recursive window update does not account for reset skipcol (#30217)
Problem:  Window is updated with potentially invalid skipcol in recursive
          window update path. I.e. cursor outside of visible range in
          large line that does not fit.
Solution: Make sure it is valid (Luuk van Baal).

3d5065fc75
2024-12-28 17:16:37 +00:00
79030bf196 fix(ui): ensure screen update before waiting for input #30576
Ensure the screen is fully updated before blocking for input. This did
not always happen before, for example when setting `cursorline
scrolloff=9999`, which lead to jerky movement when using some GUI
applications.

Because of the duality of redraw_later, this can't be done in
command-line or when waiting for "Press ENTER". In many of those cases
the redraw is expected AFTER the key press, while normally it should
update the screen immediately. So, those special cases are excluded.

(cherry picked from commit 7eba016c86)
2024-12-28 17:16:37 +00:00
aa2b69b178 ci(build.yml): disable security restriction
A new security restriction in Ubuntu 24.04 prevents users from using
`unshare`, so we need to disable it in order for the test to work
properly.
2024-12-26 22:35:35 +01:00
b36cadcb8e build: specify POST_BUILD when using add_custom_command
This is needed specifically for the second signature of
add_custom_command, which appends an operation to an existing target.
This will prevent the cmake warning CMP0175.

Reference: https://cmake.org/cmake/help/latest/policy/CMP0175.html
(cherry picked from commit 07b14c8e2e)
2024-12-26 15:22:07 +01:00
d8149e5af9 fix(inspect): use correct default highlight
Problem: `vim.highlight` was renamed on `master`, breaking the
backported fix.

Solution: Use old name.

Fixup for 650dcbbafe
2024-12-23 11:23:41 +01:00
4e1b1b6fd7 version bump 2024-12-21 18:16:24 +01:00
9b5ee7df4e NVIM 0.10.3
Christmas edition. This is a maintenance release, focusing on fixes.

FEATURES
--------------------------------------------------------------------------------
- 085f1cc99d main: expand file ~\ or ~/ prefix on Windows

FIXES
--------------------------------------------------------------------------------
- f8ee92feec deps build for ARM64 MSVC
- 163a532cfa api: make `nvim_set_hl()` respect all `cterm` attributes (#31390)
- 6a63034b51 completion: avoid deleting text when completion leader changes #31448
- c257fe5582 coverity/510275: linematch out of bounds access (#30687)
- 7ca0408a1f defaults: don't replace keycodes in Visual search mappings (#31460)
- 71faa2be88 events: don't expand `args.file` for Lua callback (#31473)
- e80e8a0980 extmark: builtin completion can still affect nearby extmarks #31387
- 7abc58349e filetype: make filetype detection work with :doautocmd (#31470)
- 98ec48eefb inccommand: ensure cursor is where it belongs
- 650dcbbafe inspect: always show priority
- b5b84b806a inspect: show priority for treesitter highlights
- bf66871113 lsp: cancel pending requests before refreshing (#31500)
- 308e9719cf lsp: retrigger diagnostics request on server cancellation (#31345) (#31427)
- 84bbbd9fbe lsp: str_byteindex_enc bounds checking #30747
- 01fe4fc589 marks: skip right_gravity marks when deleting text
- 57b0fecd47 startup: report --startuptime error to stderr (#31131)
- 3c0e1a89d9 treesitter: show proper node name error messages
- bbefbc995e tui: avoid flushing buffer halfway an OSC 2 sequence (#30793)
- 424a452401 uri: uri_encode encodes brackets incorrectly for RFC2732 #31284
- 1a030f6e04 vim.system: invalid MAX_TIMEOUT for 32-bit systems #31638
- ee7885aa21 9.1.0759: screenpos() may return invalid position (#30681)

REFACTOR
--------------------------------------------------------------------------------
- b286ba419a fix incorrect use of enum (#30924)
- fb5a0e28db sort various Lua tables in src/ alphabetically (#30978)

DOCUMENTATION
--------------------------------------------------------------------------------
- 9455686b6f misc (#29410)
- 5480c0bd75 lua: "vim.bo" is always equivalent to :setlocal (#30733)
- 27fca9c7d2 lua: clarify when on_key "typed" will be empty (#30774)
v0.10.3
2024-12-21 18:15:18 +01:00
1a030f6e04 fix(vim.system): invalid MAX_TIMEOUT for 32-bit systems #31638
The maximum signed value on 32-bit systems is 2 ^ 31 - 1. When using 2 ^ 31 for
the default timeout, the value would overflow on such systems resulting in
a negative value, which caused a stack trace when calling wait() without
a timeout.

(cherry picked from commit 4e130c1ee4)
2024-12-20 14:06:53 +00:00
bf66871113 fix(lsp): cancel pending requests before refreshing (#31500)
Problem:
Diagnostics and inlay hints can be expensive to calculate, and we
shouldn't stack them as this can cause noticeable lag.

Solution:
Check for duplicate inflight requests and cancel them before issuing a new one.
This ensures that only the latest request is processed, improving
performance and preventing potential conflicts.
2024-12-16 03:17:40 -08:00
424a452401 fix(uri): uri_encode encodes brackets incorrectly for RFC2732 #31284
**Problem:**
The brackets in the RFC2732 regular expression are currently unescaped,
causing them to be misinterpreted as special characters denoting
character groups rather than as literal characters.

**Solution:**
Escape the brackets.
Fix #31270

(cherry picked from commit 442d338cb5)
2024-12-11 14:14:33 +00:00
01fe4fc589 fix(marks): skip right_gravity marks when deleting text
Problem:  Marks that are properly restored by the splice associated with
          an undo edit, are unnecessarily pushed to the undo header. This
          results in incorrect mark tracking in the "copy_only"
          save/restore completion path.
Solution: Avoid pushing left gravity marks at the beginning of the range,
          and right gravity marks at the end of the range to the undo
          header.
(cherry picked from commit c4f76299f0)
2024-12-10 12:50:54 +00:00
7abc58349e fix(filetype): make filetype detection work with :doautocmd (#31470)
(cherry picked from commit 1077843b9b)
2024-12-10 03:17:12 +00:00
8fbe3e3941 Merge pull request #31532 from zeertzjq/backport
fix(events): don't expand `args.file` for Lua callback (#31473)
2024-12-10 10:51:40 +08:00
71faa2be88 fix(events): don't expand args.file for Lua callback (#31473)
Problem:  In an autocommand Lua callback whether `args.file` is expanded
          depends on whether `expand('<afile>')` has been called.
Solution: Always use the unexpanded file name for `args.file`.

Related to #31306 and vim/vim#16106. This doesn't provide `sfname`, but
at least makes `args.file` have a consistent value.
2024-12-10 10:19:01 +08:00
650dcbbafe fix(inspect): always show priority
Problem: It is not obvious if a treesitter highlight priority shown in
`:Inspect` is higher or lower than the default.

Solution: Also print default priority (`vim.hl.priorities.treesitter`).
Add padding for better readability.

(cherry picked from commit b52ffd0a59)
2024-12-07 16:51:17 +00:00
6a63034b51 fix(completion): avoid deleting text when completion leader changes #31448
Problem:  When completion leader changes, text that might be reinserted
          immediately after is deleted. This unnecessarily affects
          extmarks. #31387 restored the original extmarks but that
          prevents end_right_gravity marks from growing.
Solution: Avoid deleting leader text that will be reinserted.
(cherry picked from commit e788d1a3a9)
2024-12-07 14:54:33 +00:00
b5b84b806a fix(inspect): show priority for treesitter highlights
Problem: `:Inspect` does not show priority for treesitter highlights,
leading to confusion why sometimes earlier highlights override later
highlights.

Solution: Also print priority metadata if set.
(cherry picked from commit 9c278af7cc)
2024-12-07 09:51:46 +00:00
950048b206 Merge pull request #31461 from zeertzjq/backport
fix(defaults): don't replace keycodes in Visual search mappings (#31460)
2024-12-05 19:52:55 +08:00
7ca0408a1f fix(defaults): don't replace keycodes in Visual search mappings (#31460)
Also remove "silent" to be more consistent with Normal mode search.
2024-12-05 19:33:33 +08:00
78a36cdd55 Merge pull request #31452 from jamessan/backport-31358
Backport release build test fixes
2024-12-04 19:51:39 -07:00
694c3992ea test(marktree): expose test functions in release builds
In order to run the marktree unit test in release mode, the test functions need to be available even when NDEBUG is defined.

Keep the body of marktree_check a nop during release builds, which limits the usefulness of the testing, but at least lets the tests run.
2024-12-04 21:30:53 -05:00
9695650c0c ci: run tests directly rather than via the Makefile
Since the Makefile is not used to build, running the tests via the Makefile causes cmake to reconfigure and revert the release build back to debug.
2024-12-04 21:30:52 -05:00
7781111fef test(main_spec): make "nvim -v" test agnostic to build type
In release builds, the Compilation: line is omitted so the build is reproducible. Since the "fall-back for $VIM" line is always present, check for that instead.
2024-12-04 21:30:52 -05:00