Commit Graph
34770 Commits
Author SHA1 Message Date
zeertzjqandKonfekt e1aceb0068 vim-patch:e09ff34: runtime(ty): include ty compiler plugin (#37066)
closes: vim/vim#18960

https://github.com/vim/vim/commit/e09ff341294dbdd5c2db2342efc564ba34444571

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2025-12-22 08:13:20 +08:00
Sean Dewar d1189ea508 fix(window): win_move_after UAF from naughty autocmds (#37065)
Problem: use-after-free in win_move_after if win_enter autocommands free win1/2.
Solution: set w_pos_changed before calling win_enter.
2025-12-21 20:31:05 +00:00
Sean Dewar a2b9720939 fix(api): open_win leak from naughty autocommands
Problem: error set by win_set_buf may leak if autocommands immediately close the
new window.

Solution: free the error set by win_set_buf. (prefer nvim_open_win's error as
it's more important and will cause 0 to be returned)
2025-12-21 15:35:30 +00:00
Sean Dewar d788864cde fix(api): ignore split_disallowed when opening a float
Problem: split_disallowed seemingly exists to prevent issues from changing
frames to accomodate a split window, which doesn't apply to floats.

Solution: remove the restriction for nvim_open_win, but only for floats.
(continue to check b_locked_split though)

NOTE: like before, the buffer we check b_locked_split for may not actually be
the target buffer "buf", as the later call to win_set_buf can fail to switch to
"buf" due to autocommands. (among other things)

Maybe we could attempt to close the new window in that case (or switch to a
different buffer if that also fails), but this is safer. (and simpler)

Fixes #36857 (and possibly some spurious E242s I've observed from extui)
2025-12-21 15:35:30 +00:00
Jaehwang Jung 756e1eb017 fix(treesitter.foldexpr): duplicate callbacks #37048
Problem:
VimEnter clears foldinfo, so register_cbs is called again after
VimEnter. The duplicate parser callbacks break incremental fold
computation.

Solution:
Check if the callbacks are already registered.
2025-12-21 00:47:46 -05:00
Justin M. Keyes 0d206da461 Merge #37057 docs 2025-12-21 00:22:36 -05:00
Olivia Kinnear ad330e99d1 fix(statusline): diagnostics spacing #36897 2025-12-20 23:58:38 -05:00
zeertzjq acecdbff1f fix(api,lua): handle converting NULL funcref/partial (#37060)
This fixes the Coverity warnings.
2025-12-21 11:41:33 +08:00
Justin M. Keyes 4485e715fb fix(options): deprecate 'gdefault', 'magic' 2025-12-20 22:07:27 -05:00
Justin M. Keyes 060993e438 docs: misc, lsp 2025-12-20 22:07:27 -05:00
zeertzjqandglepnir f89558848b vim-patch:9.1.2001: cursor may end up in wrong window after :botright copen (#37056)
Problem:  After :botright copen and closing the quikfix window, the
          cursor ends up in the wrong window. The problem is fr_child
          always points to the first (leftmost for FR_ROW, topmost for
          FR_COL) child frame. When do :vsplit, the new window is
          created on the left, and frame_insert() updates the parent's
          fr_child to point to this new left window.
Solution: Create a snapshot before open the quickfix window and restore
          it when close it (glepnir).

closes: vim/vim#18961

https://github.com/vim/vim/commit/b43f9ded7e98261e3e662a8e919f54e7399b0316

Co-authored-by: glepnir <glephunter@gmail.com>
2025-12-21 10:41:53 +08:00
github-actions[bot] 69167006a4 docs: update version.c #36917
vim-patch:3a113e04d nsis: add Chinese translation to nsis installer
vim-patch:e1ea10a0a CI: Bump actions/cache from 4 to 5
vim-patch:9.0.1144: reading beyond text
vim-patch:9.0.1669: Crash syncing swapfile in new buffer when using sodium crypt
vim-patch:9.1.1977: MS-Windows: missing dependency on optiondefs.h in Make_cyg_ming.mak
vim-patch:9.1.1990: tests: Test_term_gettty() fails when using conpty on Windows
vim-patch:9.1.1997: Missing out-of-memory check in vim9class.c
vim-patch:9.1.1273: Coverity warns about using uninitialized value

vim-patch:8.2.0419: various memory leaks in Vim9 script code
vim-patch:8.2.0881: compiler warning for argument type
vim-patch:8.2.1532: compiler warning for conversion of size_t to long
vim-patch:8.2.1839: Vim9: memory leaks reported in assign test
vim-patch:8.2.2299: Vim9: invalid memory access making error message flaky
vim-patch:8.2.2673: Vim9: script-local funcref can have lower case name
vim-patch:8.2.3132: compiler warns for size_t to colnr_T conversion
vim-patch:8.2.3224: cannot call script-local function after :vim9cmd
2025-12-20 21:22:30 -05:00
Justin M. Keyes 81e2d2ea53 Merge #37033 from justinmk/testdelay 2025-12-20 19:52:40 -05:00
Bryan Turns bef68ba266 docs(lua): iInconsistent vim.keymap param name #37026
Problem: vim.keymap.del has 'modes' as it's first argument while vim.keymap.set
has 'mode' as it's first argument despite both 'mode' and 'modes' taking in the
same type input of String or String[].

Solution: Updated vim.keymap.set docs to refer to it's first argument
as 'modes'.
2025-12-20 19:26:44 -05:00
Eric Wong 6228acb74f feat(cmdline): completion for :TOhtml #37045 2025-12-20 19:17:38 -05:00
Justin M. Keyes 9486e4f2e2 refactor(messages): encapsulate msg_delay logic
see also 9bbbeb60e3
2025-12-20 18:38:11 -05:00
Justin M. Keyes 2eb11f21eb test(messages): skip os_delay during tests
Problem:
Tests that trigger `os_delay` messages may take 1-3 seconds, wasting
build/CI time, since this serves no purpose in tests.

Solution:
- Introduce `msg_delay` for cases where `os_delay` is being used as
  a "UI feature".
- Skip `msg_delay` in tests.
2025-12-20 18:38:11 -05:00
zeertzjqandzoumi 245a4696a2 vim-patch:1a4a1b9: runtime(zip): Use :lcd instead of :cd in zip.vim (#37054)
closes: vim/vim#18967

https://github.com/vim/vim/commit/1a4a1b9fa6a57af49e2d0955850f21c631e92263

Co-authored-by: zoumi <zoumi@users.noreply.github.com>
2025-12-20 23:26:28 +00:00
zeertzjqandChristian Brabandt 9b55f037d2 vim-patch:64799a5: runtime(doc): clarify the behavior of CTRL-Z
fixes: vim/vim#18975

https://github.com/vim/vim/commit/64799a50808a0a9750e723086ca70c3e211bc07b

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-12-21 07:12:38 +08:00
zeertzjq 03aef8fd2a vim-patch:fe8c8b1: runtime(doc): fix outdated :function help
Since patch 7.4.264 a leading "g:" is skipped.

closes: vim/vim#18976

https://github.com/vim/vim/commit/fe8c8b1e8596144029a012de2398d7bd57bcc577
2025-12-21 07:12:38 +08:00
Harsh Kapse 043f5a291a feat(health): show available queries for treesitter (#37005)
Problem: Outdated query files in `runtimepath` can trigger errors
which are hard to diagnose.

Solution: Add section to `:check treesitter` that lists all query 
files in `runtimepath`, sorted by language and query type. Files
are listed in `runtimepath` order so that the first of multiple entry
is typically the one that is used.

Note: Unlike the `nvim-treesitter` health check, this does not try
to parse the queries so will not flag incompatible ones (which would
be much more expensive).
2025-12-20 16:34:24 +01:00
zeertzjq 64eb2731da Merge pull request #37031 from zeertzjq/vim-8.2.3766
vim-patch:8.2.{3766,3767}
2025-12-20 10:08:33 +08:00
zeertzjqandBram Moolenaar a274bdf2d1 vim-patch:8.2.3767: crash when using NULL partial
Problem:    Crash when using NULL partial.
Solution:   Check for NULL.

https://github.com/vim/vim/commit/e8a92b6166e32f8e583e01c9f541cf81cf76f8e6

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-12-20 09:46:28 +08:00
f15c28ed7a vim-patch:8.2.3766: converting a funcref to a string leaves out "g:"
Problem:    Converting a funcref to a string leaves out "g:", causing the
            meaning of the name depending on the context.
Solution:   Prepend "g:" for a global function.

https://github.com/vim/vim/commit/c4ec338fb80ebfb5d631f0718fdd1a1c04d9ed82

Co-authored-by: Bram Moolenaar <Bram@vim.org>
Co-authored-by: Jan Edmund Lazo <jan.lazo@mail.utoronto.ca>
2025-12-20 09:45:47 +08:00
Sean Dewar eac2f0443e feat(tag): respect jumpoptions=view when popping tagstack (#37021)
Problem: jumpoptions=view has no effect when popping from the tagstack.
Solution: make it work.
2025-12-19 23:32:09 +00:00
zeertzjq 5f22cf5af3 Merge pull request #37024 from zeertzjq/vim-1e3e1ba
vim-patch: tutor updates
2025-12-19 08:32:12 +08:00
zeertzjqandChristian Brabandt ca0eb8b1d1 vim-patch:757b42a: runtime(tutor): Chapter 2: consistently use upper case letter, fix typo after 1e3e1ba067c79a
Chapter 2: Fix missing "R" after 1e3e1ba067c79a when using register from insert
mode. While at it, consistently use upper case letter for CTRL-R in the
new-tutor.

related: vim/vim#18950

https://github.com/vim/vim/commit/757b42ab070632806ab10e94e26b70fc7bb60cb9

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-12-19 08:12:55 +08:00
zeertzjqandChristian Brabandt b2b9b78209 vim-patch:1e3e1ba: runtime(tutor): Update Chapter 2, remove mentioning surround plugin
fixes: vim/vim#18950

https://github.com/vim/vim/commit/1e3e1ba067c79aa2c7f0d53ed1e102089a29e692

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-12-19 08:12:54 +08:00
zeertzjq 2860d1e018 vim-patch:9.1.1998: tests: not enough tests for :setlocal omnifunc (#37023)
Problem:  Not enough tests for :setlocal omnifunc (after 9.1.1991).
Solution: Move the last :new after :setlocal. Also test with 'complete'
          (zeertzjq).

closes: vim/vim#18958

https://github.com/vim/vim/commit/cedb1a31714550c44bdb3b1991c63c90faa8a75c
2025-12-19 08:08:26 +08:00
yilisharcs 04357f2eff vim-patch:fe0bafc: runtime(compiler): improve rust errorformat (#37022)
This commit adds match patterns for:
- warnings with error codes (warning[E0123]: foobar)
- valid nightly unicode entries

closes: vim/vim#18957

https://github.com/vim/vim/commit/fe0bafc7286b5b18b2f8df449041f390cbf621ab
2025-12-19 07:53:58 +08:00
zeertzjq c08139d790 fix(lua): don't remove first char of non-file stacktrace source (#37008) 2025-12-18 08:09:16 +08:00
zeertzjq c172fd9f46 vim-patch:9.1.1991: :setlocal changes effective global 'omnifunc' (#37013)
Problem:  :setlocal changes effective global 'omnifunc' (Maxim Kim)
Solution: Don't change global callback when using :setlocal (zeertzjq).

fixes:  vim/vim#18948
closes: vim/vim#18951

https://github.com/vim/vim/commit/3e82b0ebfe7fe2d87bc7bc843291f13183aac828
2025-12-17 23:26:42 +00:00
yilisharcs 43db13bfa8 vim-patch:bd5e882: runtime(compiler): Match gcc.vim make error format (#37012)
Problem:  gcc.vim interprets "make: *** [Makefile" in the error message
          "make: *** [Makefile:2: all] Error 1" as a valid filename.
Solution: Add pattern to extract the filename correctly. Note that this
	  doesn't remove the dangling "]" from the output ("all]").

closes: vim/vim#18956

https://github.com/vim/vim/commit/bd5e882a913929864ad650a4ccf3bd5127d1bc25
2025-12-18 07:08:57 +08:00
yilisharcs 0c27c1175b refactor(editor): extract backup name generation logic #37001
Problem: The logic for generating backup file names is duplicated in
`buf_write_make_backup` and difficult to reuse.

Solution: Extract name generation logic into `buf_get_backup_name`.
2025-12-17 11:05:16 -05:00
glepnir 856391bc7f fix(health): "q" keymap not set when health.style=float #37007
Problem:
The q keymap is already set in open_floating_preview, so maparg('q') is not empty.

Solution:
Add a health.style check before setting the q keymap.
2025-12-17 10:53:08 -05:00
zeertzjq 99e8b61376 Merge pull request #37006 from janlazo/vim-8.2.1939
vim-patch:8.2.{1939,1941}
2025-12-17 14:38:57 +08:00
Jan Edmund LazoandBram Moolenaar 1b1a8895bd vim-patch:8.2.1941: Ex mode test fails on MS-Windows with GUI
Problem:    Ex mode test fails on MS-Windows with GUI.
Solution:   Skip the test when using gvim.

https://github.com/vim/vim/commit/399db046ed7cc64b68ffa68b543c1b1c20baeee3

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-12-17 00:47:13 -05:00
Jan Edmund LazoandBram Moolenaar d6607dae41 vim-patch:8.2.1939: invalid memory access in Ex mode with global command
Problem:    Invalid memory access in Ex mode with global command.
Solution:   Make sure the cursor is on a valid line. (closes vim/vim#7238)

https://github.com/vim/vim/commit/3b6d57f2ce87dc5a4b1a50e1b0fd2aeaf72faae2

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-12-17 00:46:41 -05:00
glepnir 0197f13ed4 fix(lsp): sort items when completeopt include fuzzy #36974
Problem: When fuzzy is enabled and the prefix is not empty,
items are not sorted by fuzzy score before calling fn.complete.

Solution: Use matchfuzzypos to get the scores and sort the items
by fuzzy score before calling fn.complete.
2025-12-16 22:39:47 -05:00
jdrouhard 8a94daf80e fix(lsp): simplify semantic tokens range request logic #36950
By simplifying the way range is supported, we can fix a couple issues as
well as making it less complex and more efficient:

* For non-range LSP servers, don't send requests on WinScrolled. The
  semantic tokens module has been reworked to only send one active
  request at a time, as it was before range support was added. If range
  is not supported, then send_request() only fires if there's been a
  change to the buffer's document version.
* Cache the server's support of range and delta requests when attaching
  to a buffer to save the lookup on each request.
* Range requests always use the visible window, so just use that for the
  `range` param when sending requests when range is supported by the
  server. This reduces the API surface area of send_request().
* Debounce the WinScrolled autocmd requests in the same the way requests
  are debounced when the buffer contents are changing. Should allow
  scrolling via mouse wheel or holding down "j" or "k" work a bit
  smoother.

The previous iteration of range support allowed multiple active requests
to be in progress simultaneously. However, a bug was preventing any but
the most recent request to actually apply to the client's highlighting
state so that complexity was unused. It was effectively only using one
active request at a time but was just using range requests on
WinScrolled events instead of a full (or delta) request when the
document version changed.
2025-12-16 22:06:55 -05:00
zeertzjq 5c22feac06 Merge pull request #36989 from zeertzjq/vim-9.0.1758
vim-patch:9.{0.1758,1.1983,1.1987}
2025-12-17 07:12:08 +08:00
zeertzjq 544bde3acc vim-patch:9.1.1987: assert_equal() prepends unnecessary ':' when typed
Problem:  assert_equal() prepends unnecessary ':' when typed
          (after 9.0.1758).
Solution: Don't change a NULL stacktrace to an empty string (zeertzjq).

closes: vim/vim#18936

https://github.com/vim/vim/commit/c4b3aefd0d5f81693e7098f224d3e4bfe24a7aa7
2025-12-17 06:47:34 +08:00
zeertzjqandJohn Marriott 6061169183 vim-patch:9.1.1983: Vim9: class_name definition can be improved
Problem:  Vim9: class_name definition can be improved
Solution: Use string_T to store class_name, avoid using STRLEN() calls,
          simplify code, remove unused definition of struct
          oc_newmember_S (John Marriott)

Use struct string_T to store the field class_name in struct class_T,
which means we can just use the .length field in struct string_T
instead of measuring it.

In addition:
1. In eval.c use string_T to store class_name and s in function
   class_tv2string().
2. In vim9type.c change some calls from ga_concat() to ga_concat_len()
   where the length is known.
3. In vim9class.c remove unused struct definition oc_newmember_S.
   Change some calls from ga_concat() to ga_concat_len() where the
   length is known.
4. In scriptfile.c use string_T to store type_name, class_name and
   es_name in function estack_sfile().
5. In function estack_sfile() simplify construction of the grow array ga
   and change some calls from ga_concat() to ga_concat_len() when the
   length is known.

closes: vim/vim#18925

https://github.com/vim/vim/commit/2019321e0be320183afa47b7ea979dc4fc3984a0

Co-authored-by: John Marriott <basilisk@internode.on.net>
2025-12-17 06:47:34 +08:00
zeertzjqandLemonBoy 53fd3657cc vim-patch:9.0.1758: vim9 no class identifiers in stack dumps
Problem:  vim9 no class identifiers in stack dumps
Solution: Prefix class members in stack traces with the class name
          followed by a dot.

closes: vim/vim#12866
closes: vim/vim#12078

https://github.com/vim/vim/commit/0ffc17aa479867f6f3ee14a46cf71352f126b5ba

Co-authored-by: LemonBoy <thatlemon@gmail.com>
2025-12-17 06:47:33 +08:00
Justin M. Keyes 02def1a32e Merge #36925 :lsp command 2025-12-16 13:48:43 -05:00
Olivia Kinnear bd225422a5 fix(lsp): tests for :lsp, rename start/stop
- Rename :lsp start/stop to enable/disable
- Move lua section of `:lsp` to `vim/_core`
- Add tests
2025-12-16 13:46:08 -05:00
brianhusterandglepnir 63abb1a88f feat(lsp): builtin :lsp command
Problem:
- Despite [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig)
  claims to be a "data-only" plugin, in fact it still provides some
  user-facing commands because they haven't been upstreamed to Nvim.

Solution:
- Upstream `:LspRestart`, `:LspStart` and `:LspStop` commands as `:lsp
  restart`, `:lsp start` and `:lsp stop` respectively.

Co-authored-by: glepnir <glephunter@gmail.com>
2025-12-16 13:46:04 -05:00
Ian Beckett 89d26d61d2 fix(vim.pack): increase default timeout #36992 2025-12-16 13:22:05 -05:00
glepnir 6af8958055 fix(highlight): respect 'winhighlight' in CursorLine Normal check #36927
Problem:
CursorLine background check used global `normal_bg`, ignoring 'winhighlight'.

Solution:
Use `bg_attr` to get window-local Normal background instead.
2025-12-16 00:51:54 -05:00
zeertzjq 1d22b05f8d docs: update support.txt (#36903) 2025-12-16 12:55:32 +08:00