Commit Graph

32669 Commits

Author SHA1 Message Date
1c96b72dfa fix(deps): make script/bump_deps.lua update build.zig.zon versions in sync
Also bring luv version in build.zig.zon up to date

This skips some deps not currently managed/used by build.zig
2025-05-10 10:34:40 +02:00
1d9990daac fix(folds): avoid unnecessary loop with horizontal scrolling (#33932)
Fix #33931
2025-05-10 10:36:33 +08:00
9b11746d80 Merge pull request #33930 from zeertzjq/vim-17ad852
vim-patch: doc updates
2025-05-10 08:40:14 +08:00
cb12c8fa47 vim-patch:9973b39: runtime(doc): remove duplicate sentence in builtin.txt
9973b39a17

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-05-10 07:29:41 +08:00
1bfb8dd338 vim-patch:17ad852: runtime(doc): update return types for builtin functions
fixes: vim/vim#17273

credit: Github user @msoyka2024

17ad852a62

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-05-10 07:29:37 +08:00
db702782e0 fix(extui): close cmdwin to enter "more" window (#33860)
Problem:  Cannot enter "more" window while cmdwin is open since it is a
          regular window and changing windows is disallowed.
Solution: Close cmdwin to enter the "more" window. Minor regression
          w.r.t. the current message grid. Resolving that will require
          somehow bypassing textlock for the "more" window.
2025-05-09 23:54:39 +02:00
c2d218d0c6 test(treesitter): add flaky test to TEST_SKIP_FRAGILE #33912
ref: https://github.com/neovim/neovim/issues/33910#issuecomment-2863276239
2025-05-09 12:26:17 -07:00
e56292071a fix(terminal): check size when switching buffers
Problem: terminal not always resized when switching to its buffer.
Solution: add missing calls to terminal_check_size.
2025-05-09 17:49:57 +01:00
302e59f734 feat(extui): assign 'filetype' to extui windows (#33924)
Problem:  Unable to discern windows used by the extui interface
          to configure their local options.
          'winblend' may be detrimental to legibility depending on the
          colorscheme and 'background'.
Solution: Assign the "cmdline", "msgmore", "msgprompt" and "msgbox" 
          'filetype' to the respective windows.
          Don't set 'winblend' for the message "box" window.
2025-05-09 14:47:36 +02:00
6adf48b66d fix(decor): extmark highlight not applied (#33858)
Problem: If the only highlight present in the buffer is an extmark, and its end
position is outside the screen, redraws that start on lines after the
first line of the mark will consider the buffer as not having any highlights,
and skip drawing the mark's highlight.
Solution: Check the updated number of decor ranges.
2025-05-09 12:37:43 +02:00
7e787f6a4f fix(extui): route interactive messages to more-window (#33885)
Problem:  Extui does not route messages emitted as a result of a typed
          command to the "more" window.
          Command message leading shell messages is missing a kind.
          Messages not routed to 'cmdheight' area after it was 0.
Solution: Route messages that were emitted in the same event loop as an
          entered command to the "more" window. Also append multiple
          messages in an already open more-window.
          Assign it the `shell_cmd` kind.
          Change message position when 'cmdheight' changes from 0.
2025-05-09 12:17:26 +02:00
3121e02ae0 Merge pull request #33918 from zeertzjq/vim-9.1.1373
vim-patch:9.1.{1373,1374}
2025-05-09 07:21:21 +08:00
15d31fe7a6 vim-patch:9.1.1374: completion: 'smartcase' not respected when filtering matches
Problem:  Currently, 'smartcase' is respected when completing keywords
          using <C-N>, <C-P>, <C-X><C-N>, and <C-X><C-P>. However, when
          a user continues typing and the completion menu is filtered
          using cached matches, 'smartcase' is not applied. This leads
          to poor-quality or irrelevant completion suggestions, as shown
          in the example below.
Solution: When filtering cached completion items after typing additional
          characters, apply case-sensitive comparison if 'smartcase' is
          enabled and the typed pattern includes uppercase characters.
          This ensures consistent and expected completion behavior.
          (Girish Palya)

closes: vim/vim#17271

dc314053e1

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-05-09 06:48:18 +08:00
6b955af875 vim-patch:9.1.1373: 'completeopt' checking logic can be simplified
Problem:  Flag checking logic uses a temporary variable and multiple
          bitwise operations in insexpand.c
Solution: Consolidate into a single equality check using bitwise OR and
          comparison (glepnir)

closes: vim/vim#17276

c3fbaa086e

Co-authored-by: glepnir <glephunter@gmail.com>
2025-05-09 06:48:18 +08:00
ab5c15610f vim-patch:partial:9.1.1371: style: indentation and brace issues in insexpand.c
Problem:  style: indentation issue in insexpand.c
Solution: update style (glepnir)

closes: vim/vim#17278

19e1dd6b6a

Co-authored-by: glepnir <glephunter@gmail.com>
2025-05-09 06:48:05 +08:00
50c200fcd4 Merge pull request #33850 from MariaSolOs/on-jump
feat(diagnostic): add `on_jump` callback option
2025-05-08 11:42:24 -05:00
ee1d389fa6 Merge pull request #33905 from seandewar/doc-color-nil
fix(lsp): nil error in ColorScheme autocmd
2025-05-08 11:41:49 -05:00
7c43f8e433 fix(messages): messages added to history missing from ext_messages "g<" #33907
Problem:  Messages that are already added to the history are not emitted
          as part of the "g<" msg_history_show event.

Solution: Move clearing the history for temporary messages to before
          adding a message to the history, rather than after emitting
          a message.
2025-05-08 05:50:25 -07:00
d976834864 fix(lsp): nil error in ColorScheme autocmd
Problem: nil error possible if a loaded buffer hasn't been drawn in a window:

```vim
lua vim.lsp.document_color.is_enabled() -- Load module
badd foo
call bufload('foo')
colo default
```

Solution: Skip _buf_refresh branch also if bufstates[bufnr] is nil.
2025-05-08 09:28:20 +01:00
1b8ae4336d test(swapfile): don't check for line with full file path (#33896)
Wrapping can happen anywhere where in the full file path, breaking the
matching. Match a line with the "Xswaptest" line instead.
2025-05-08 07:51:23 +08:00
6dee1672cc fix(extui): "box" window width calculated on last line (#33881)
Problem:  The "box" window width is calculated on the last line when
          applying "last" virt_text. There may be longer lines
          part of the same message.
Solution: Don't decrease box width if the calculated width is smaller.
          Minor unrelated changes.

Co-authored-by: Eike <eike.rackwitz@mail.de>
2025-05-07 10:02:53 +02:00
27311b0b5c Merge pull request #33879 from zeertzjq/vim-fe22867
vim-patch: runtime file updates
2025-05-07 11:11:03 +08:00
186851b1bd vim-patch:87947a9: runtime(sh): Update syntax, match KornShell compound arrays
closes: vim/vim#17268

87947a9a76

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-05-07 09:46:01 +08:00
d8621a53ac vim-patch:adfeb4a: runtime(spec): add more local macro names according to rpm 4.20
closes: vim/vim#17258

adfeb4ad95

Co-authored-by: fundawang <fundawang@yeah.net>
2025-05-07 09:45:43 +08:00
45e9054813 vim-patch:fe22867: runtime(sh): Update syntax, fix single-quoted strings in parameter expansions
Ignore single-quoted backslash escape sequences in parameter expansions.

\' is not an escaped single quote in ${foo:-'word\'}.

closes: vim/vim#17261

fe22867ef5

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-05-07 09:45:34 +08:00
ac67098998 fix(messages): "list_cmd" kind for mark commands #33874
Problem:  `:marks/jumps/changes` are missing a message kind.

Solution: Assign the "list_cmd" kind to them.
2025-05-06 18:23:38 -07:00
2aa7948266 fix(treesitter): invalidate conceal_lines cache earlier #33875
Problem:  conceal_lines cache is invalidated in `on_buf`
          which is too late for code calculating text height after a
          buffer change but before a redraw (like `lsp/util.lua`).

Solution: Replace `on_buf` with `on_bytes` handler that invalidates
          the cache and clears the marks.
2025-05-06 18:03:54 -07:00
fb59188b6d vim-patch:0fb6cea: runtime(lua): update 'path' option in filetype plugin #33876
Problem:  Lua doesn't support importing module in path related to current
          file like JS does (https://www.reddit.com/r/lua/comments/wi0bau/whats_the_correct_way_to_run_a_lua_file_that_uses/)
Solution: Remove `.` from Lua buffer-local option `'path'`

closes: vim/vim#17267

0fb6ceac4c
2025-05-06 18:02:06 -07:00
f5b5f2095e refactor(tests): lint decorations_spec, float_spec, multigrid_spec #33274
Problem:
decorations_spec.lua, float_spec.lua, multigrid_spec.lua are not
auto-formatted.

Solution:
Add a special `formatlua2` cmake target, which invokes `stylua` with
an alternative `.stylua2.toml` config.
2025-05-06 18:00:20 -07:00
a81d2b6703 docs(luv): replace bundled LuaCATS meta files with upstream
Synced from https://github.com/luvit/luv/blob/master/meta.lua
2025-05-06 18:47:33 +02:00
8707ec2644 fix(termkey): out-of-bounds write in array #33868
Problem:
termkey crashes due to an out-of-bounds write in an array when it
received a CSI sequence with 17 or more arguments. This could be
observed on startup with certain terminal emulators like [RLogin], which
send a response to the `CSI c` query containing 17 parameters.

The termkey code has a boundary check, but its comparison operator is
incorrect.

Solution:
Correct the comparison operator to ensure proper boundary checking.

With this change, I have confirmed that the crash no longer occurs on
RLogin. https://github.com/kmiya-culti/RLogin

Fixes #24356
2025-05-06 05:20:03 -07:00
db2b774a16 fix(runtime): 'includeexpr' with non-Nvim-style Lua modules #33867
Closes #33862
2025-05-06 05:15:31 -07:00
c65817774d feat(diagnostic): add on_jump callback option 2025-05-05 19:59:22 -07:00
8d75910ef9 fix(treesitter): eliminate flicker for single windows #33842
This commit will eliminate flicker while editing one open window. It
works by querying previously calculated trees for highlight marks, in
the case that we are still asynchronously parsing in `on_win`.

It will not fully solve the case of flicker when there are multiple open
windows, since the parser will drop previously parsed injection trees
whenever it receives a call to parse a different region of the buffer.
This will require a refactor of `languagetree.lua`.
2025-05-05 19:05:16 -07:00
9efdd4fe98 fix(extui): drop "more" window that is no longer floating #33861
Problem:  Moving the "more" (or any extui)-window to a split with
          `wincmd L` does not invalidate it as a tracked window.

Solution: Drop an extui window that is no longer floating.
2025-05-05 11:28:02 -07:00
1e7406fa38 feat(api): nvim_cmd supports plus ("+cmd", "++opt") flags #30103
Problem:
nvim_cmd does not handle plus flags.

Solution:
In nvim_cmd, parse the flags and set the relevant `ea` fields.
2025-05-05 05:58:36 -07:00
912388f517 fix(messages): list_cmd kind for buffer line messages (#33855)
Problem:  Missing kind and separate event for each line for message
          containing buffer lines for e.g. `:print`.
Solution: Set the `list_cmd` kind and only `msg_start()` for the first
          message, print a newline instead.
2025-05-05 12:04:09 +00:00
2d75ea6afe Merge pull request #33753 from bfredl/hotgrid
fix(grid): don't scroll on an invalid grid
2025-05-05 11:20:13 +02:00
1ad9cdd403 fix(grid): check allocated grid size when suspicious scrolling
fixes #33749
2025-05-05 10:50:18 +02:00
40351bbbbe fix(lua): vim.validate message param #33675
Problem:
vim.validate does not handle `message` param.

Solution:
Add the missing logic.
2025-05-04 16:36:32 -07:00
0862c1036a fix(lsp): check if client is stopping before reuse #33796
Problem:
Stopping a language server and then calling vim.lsp.start() with the same name/root will return the old language server that's in the middle of shutting down. vim.lsp.start() won't return a new server until the old process has terminated.

Solution:
Introducing a client._is_stopping field that tracks the shutdown phase, preventing the client from being reused.
2025-05-04 14:38:01 -07:00
df345503eb refactor(lua): swap value params in tbl_extend behavior callback #33847 2025-05-04 14:28:03 -07:00
0402f5a76b Merge pull request #33848 from psnszsn/master
fix(build): musl libc build.zig
2025-05-04 23:21:37 +02:00
3268f51d20 fix(build): musl libc build.zig 2025-05-04 22:55:19 +02:00
d4ecfc4234 fix(extui): message may overwrite active cmdline #33846
Problem:  Active cmdline may be overwritten by a message.

Solution: Check if cmdline is active before writing message.
2025-05-04 20:02:02 +00:00
ba2a5a7787 Merge pull request #33837 from bfredl/cmakeversion
fix(build): use correct cmake expression for $<CONFIG>

fixes #33835
2025-05-04 19:35:07 +02:00
72ec410134 Merge #33789 cleanup error messages 2025-05-04 08:53:29 -07:00
fc2dee1736 feat(messages): cleanup Lua error messages
"Error" in error messages is redundant. Just provide the context, don't
say "Error ...".
2025-05-04 11:22:57 -04:00
af4f7f1618 test: multiline assert_log()
Problem:
assert_log() only matches single lines. This was never an intentional
decision, it was merely a result of using read_file_list().

Note: any tests that indiscriminately match `.*` should be rewritten to
avoid (unlikely) "false positives". I checked all existing tests.

Solution:
Change assert_log() to match the concatenated lines instead of matching
per-line.
2025-05-04 10:35:07 -04:00
8f5bd569c5 feat(lsp): support documentColor dynamic registration #33800 2025-05-04 07:00:21 -07:00