Commit Graph

33232 Commits

Author SHA1 Message Date
8c6ea76ebc fix(extui): disable cmdline highlighter when showing a message (#34887)
Problem:  When message is moved from message window to cmdline,
          the cmdline highlighter is not disabled.
Solution: Disable the highlighter (and only scroll to bottom when
          message was moved to pager).
2025-07-12 01:15:31 +02:00
d4074b812d vim-patch:9.1.1538: tests: string options in gen_opt_test.vim not fully sorted (#34891)
Problem:  tests: string options in gen_opt_test.vim aren't fully sorted.
Solution: Sort the string options alphabetically.  Also make description
          of 'maxsearchcount' start with lower-case for consistency with
          other options, update documentation for searchcount().

closes: vim/vim#17720

7306e8fcdb
2025-07-11 22:56:43 +00:00
7f5b5d34cf fix(window): don't store invalid height in window config (#34885)
Problem:  When 'winminheight' is zero and the window height is set to
          zero, the actual height is clamped whereas the stored config
          value is not. Reciprocal window configuration through
          nvim_win_get_config() then results in an error.
Solution: Also clamp the stored dimensions in the window config.
2025-07-11 16:53:30 +00:00
9e968635ef fix(extui): check if buffers/windows exist before deleting (#34886)
Problem: Disabling vim._extui may try to delete non-existent windows/buffers.
Solution: Check that window/buffer is valid before deleting.
2025-07-11 17:31:30 +02:00
4f3aa7bafb Merge #34558 docs 2025-07-10 22:36:16 -04:00
7a69fefdb9 fix(vim.json): loss of precision on integers >14 digits #34876
Problem: multiple DAP servers keep assuming they can have internal IDs
         up to 2**52, which get corrupted by the Neovim JSON encoder.
Solution: change (1) constant and add a test so nobody breaks it while
          updating the library.

Fixes: https://github.com/neovim/neovim/issues/24532
Fixes: https://github.com/mfussenegger/nvim-dap/issues/1534
Fixes: https://github.com/facebook/buck2/issues/1032
2025-07-10 19:07:56 -07:00
c3e2926f17 docs: deprecate :ownsyntax 2025-07-10 21:50:46 -04:00
e78c877688 docs: rename ui.txt => api-ui-events.txt 2025-07-10 21:50:46 -04:00
58df501913 docs: api, pack, events, develop 2025-07-10 21:50:46 -04:00
00f8f94d5b vim-patch:9.1.1535: the maximum search count uses hard-coded value 99 (#34873)
Problem:  The maximum search count uses a hard-coded value of 99
          (Andres Monge, Joschua Kesper)
Solution: Make it configurable using the 'maxsearchcount' option.

related: vim/vim#8855
fixes: vim/vim#17527
closes: vim/vim#17695

b7b7fa04bf

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-07-11 09:17:05 +08:00
54cde0674b test(ui/{cmdline,message}2_spec): reduce flakiness/runtime #34875
Problem:  Storing the configured 'cmdheight' value is scheduled and
          may happen after cmdline2_spec already entered block_mode.
          Excessive wait time for expected screen state due to delayed
          ruler after an error message.
Solution: Only schedule storing the user configured 'cmdheight' if
          v:vim_did_enter is unset. Use regular message instead of error.
2025-07-10 17:52:50 -07:00
9809ce8b47 vim-patch:6ac2e4a: runtime(vim): Update base syntax, improve function call highlighting (#34874)
- Match more function calls.
- Contain function call syntax groups.
- Improve differentiation between Ex commands and builtin functions with
  the same name.  Remove special cases.  Command modifiers are not
  currently well differentiated from functions.

closes: vim/vim#17712

6ac2e4aa0a

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-07-11 07:20:25 +08:00
68e316e3f9 feat(diagnostic): jump to related info location from open_float #34837
This commit allows users to jump to the location specified in a
diagnostic's `relatedInformation`, using `gf` from within the
`open_float` window. The cursor need only be on line that displays the
related info.
2025-07-10 11:24:17 -07:00
7bd4dfd209 refactor(lsp): simplify multiline semantic token logic #34698
This commit makes it so that only one call to `vim.str_byteindex` is
needed, at the end of the `end_line`, `end_col` calculations.
2025-07-10 11:12:18 -07:00
4745270bf1 feat(lsp): support textDocument/colorPresentation (#34823)
feat(lsp): support for `textDocument/colorPresentation`
2025-07-10 08:51:26 -07:00
213360c389 fix(lsp): custom 'winborder' in make_floating_popup_options() #34868 2025-07-10 05:51:13 -07:00
5803994a1c fix(highlight): preserve bg transparency with winblend=100 #34825
Problem: When winblend=100 is set on floating windows with transparent
background, the desktop background is not visible through the window.

Solution: Add special case to preserve transparency (-1) when blend
ratio is 100% and background was originally transparent.
2025-07-10 05:42:45 -07:00
e644038f06 docs: move vim.system to own section 2025-07-10 13:34:58 +01:00
7f18811668 vim-patch:32a1b26: runtime(filetype): improve asm heuristics and move into FTasmsyntax() (#34863)
fixes: vim/vim#17474
closes: vim/vim#17683

32a1b26ef3

vim-patch:41ee98c: runtime(filetype): fix incorrect pattern and break early

- Using `\n` is incorrect, as result of getline() does not contain line
  breaks and only uses `\n` for NUL bytes.
- Return when b:asmsyntax is set, like many other filetypes.

closes: vim/vim#17706

41ee98c3c5

Co-authored-by: Wu Yongwei <wuyongwei@gmail.com>
2025-07-10 20:30:39 +08:00
fccd016a0f vim-patch:bda55df: Revert "runtime(haskell): Add single quote to iskeyword in ftplugin (vim/vim#8191)"
This reverts commit 5e6e4042b1c9685bce86493e3ee6fe916a7f221c.

related: vim/vim#8191

bda55df3b8

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-07-10 09:29:15 +02:00
e65c0a0810 fix(tui): check for title support correctly (#34866) 2025-07-10 14:17:20 +08:00
fb0dc825e9 feat(option): custom chars in 'winborder' #33772
Problem: winborder option only supported predefined styles and lacked support for custom border characters.

Solution: implement parsing for comma-separated list format that allows specifying 8 individual border characters (topleft, top, topright, right, botright, bottom, botleft, left).
2025-07-09 18:15:08 -07:00
7526fb449d feat(extui): use winborder for msg window #34859
Problem:  The message window is essentially a regular floating window
          but does not use 'winborder'.
          Still some "scratch" buffer options unset after it was removed
          from its window.
Solution: Do not set the border when opening the window message.
          Forego passing `scratch = true` when opening a buffer,
          set the options manually when necessary.

Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
2025-07-09 17:42:47 -07:00
8aed423072 vim-patch:3987eac: runtime(doc): clarify how ex ranges are adjusted when acting on folds (#34862)
closes: vim/vim#17696

3987eac572

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-07-09 22:55:35 +00:00
76f6868e0a fix(runtime): no conceal in qf on :lopen #34854
Problem:
No conceal in qf on `lopen` since 74fcc945. Repro:

    nvim --clean +'tab Man ls' +'norm gO' +lclose +lopen

Solution:
Consider "Table of contents" title.
2025-07-09 09:36:10 -07:00
840cdb9589 feat(shada): shada should not store nobuflisted buffers #21818
Problem:  Shada jumplist entries still include entries from e.g. 'nobuflisted' buffers.
Solution: Check `ignore_buf()` before adding jumplist entries, followup to b98eefd8.

Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
2025-07-09 09:33:20 -07:00
3a3484be29 test(messages/cmdline_spec): convert highlight IDs to name and format (#34845)
Problem:  Hardcoded highlight IDs for ext_messages/cmdline output need
          to be adjusted everytime a builtin highlight group is added.
Solution: Store a global map of default highlights through nvim_get_hl()
          and fetch missing (custom) highlight groups through synIDattr().
          Use more compact formatting for screen:expect().
2025-07-09 09:33:19 +00:00
3c9484b550 feat(extui): show dismissed message in cmdline (#34745)
Problem:  An accidental key press can dismiss a routed message to be
          shown in full before the user was able to read it.
          'verbose' message routing based on an outdated condition results
          in "last_set" messages being separated from its message pair.
Solution: Show a message to be shown in full in the cmdline window instead
          of the pager. Keep it there and update the spill indicator when
          the message is dismissed.
          Remove the 'verbose' message routing.
2025-07-09 11:17:18 +02:00
88774965e5 feat(api): relax contract, allow return-type void => non-void #34811
Allow changing return-type from `void => non-void`.
2025-07-09 02:40:08 +00:00
96aef50624 Merge pull request #34852 from zeertzjq/vim-9.1.1526
vim-patch:9.1.{1526,1528}
2025-07-09 08:55:08 +08:00
5fe310c5e6 vim-patch:9.1.1528: completion: crash with getcompletion()
Problem:  completion: crash with getcompletion()
          (zeertzjq)
Solution: Don't set may_expand_pattern in f_getcompletion(),
          unset may_expand_pattern() once it is not longer needed
          (Girish Palya).

fixes: vim/vim#17680
closes: vim/vim#17686

f2ec8d4afc

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-07-09 08:06:23 +08:00
ef0ec7edac vim-patch:9.1.1526: completion: search completion match may differ in case
Problem:  completion: search completion match may differ in case
          (techntools)
Solution: add "exacttext" to 'wildoptions' value (Girish Palya)

This flag does the following:

exacttext
      When this flag is present, search pattern completion
      (e.g., in |/|, |?|, |:s|, |:g|, |:v|, and |:vim|)
      shows exact buffer text as menu items, without
      preserving regex artifacts like position
      anchors (e.g., |/\<|). This provides more intuitive
      menu items that match the actual buffer text. However,
      searches may be less accurate since the pattern is not
      preserved exactly.
      By default, Vim preserves the typed pattern (with
      anchors) and appends the matched word. This preserves
      search correctness, especially when using regular
      expressions or with 'smartcase' enabled. However, the
      case of the appended matched word may not exactly
      match the case of the word in the buffer.

fixes: vim/vim#17654
closes: vim/vim#17667

93c2d5bf7f

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-07-09 08:06:23 +08:00
db7c2acbc6 vim-patch:9.1.1532: termdebug: not enough ways to configure breakpoints (#34851)
Problem:  termdebug: not enough ways to configure breakpoints
Solution: add the termdebug_config['signs'] config setting, rework the
          termdebug test cases (Dimitry Ishenko)

Allow to configure custom breakpoint signs so one can do something like
this:

```vim
let g:termdebug_config['signs'] = ['>1', '>2', '>3', '>4', '>5', '>6', '>7', '>8', '>9']
let g:termdebug_config['sign'] = '>>'
```

where the first 9 breakpoints will have their own signs and the rest
will be the same (>>).

While at it, rework the test for the termdebug plugin:

- Added test for g:termdebug_config['signs'].
- Added test for g:termdebug_config['sign'].
- Moved test for g:termdebug_config['sign_decimal'] into
  Test_termdebug_basic()

closes: vim/vim#17694

c4bca1de0b

Co-authored-by: Dimitry Ishenko <dimitry.ishenko@gmail.com>
2025-07-08 22:38:58 +00:00
435f03ee10 docs: tag of :EditQuery #34844
Problem:
- Running `:h :EditQuery` throws error `E149: Sorry, no help for
  :EditQuery`
- vim_diff.txt miss an entry for `:EditQuery`

Solution:
- Make tag `[:EditQuery]()` right-aligned, similar to command `:Open`
- Update vim_diff.txt
2025-07-08 05:28:12 -07:00
bb6422f1ad docs(tutor): Chinese (zh-CN) translation #34803
Co-authored-by: glepnir <glephunter@gmail.com>
2025-07-08 05:26:39 -07:00
28b7c2df52 fix(health): floating window closes when opening TOC (gO) #34794
Problem: Health check floating window gets closed when pressing 'gO' to show TOC because LSP floating preview system auto-closes on BufEnter events triggered by :lopen.

Solution: Temporarily disable BufEnter event for the current window during TOC operations and adjust window layout to prevent overlap.
2025-07-08 05:21:09 -07:00
f68a5c40f0 feat(messages): add "prev_cmd" argument to msg_history_show (#34779)
Problem:  Unable to tell whether msg_history_show event is emitted for a
          :messages or g< command.
Solution: Add "prev_cmd" argument that is set to true for g<.
2025-07-08 11:19:02 +02:00
f576b59a09 docs: type fixes #34831 2025-07-07 18:56:22 -07:00
bf9d3e4bf8 fix(prompt): lnum update via nvim_buf_set_lines if buf != curbuf #34833
Fixes the case from https://github.com/neovim/neovim/issues/34561#issuecomment-3031536581
2025-07-07 17:42:45 -07:00
d88bebfbc7 docs: misc #34834
Problems:
- Miss some entries in `vim_diff.txt` and `index.txt`.
- I want to learn about Vim register, but when I type `:h register`, it
  shows sponsor information instead. Note that unlike Nvim, Vim has a
  separate session for `*register*`

Solution:
- Add missing commands to `index.txt`, `vim_diff.txt`
- Remove tag `register` from `index.txt`
2025-07-07 17:31:37 -07:00
27daeb0d68 vim-patch:9.1.1520: completion: search completion doesn't handle 'smartcase' well (#34840)
Problem:  When using `/` or `?` in command-line mode with 'ignorecase' and
          'smartcase' enabled, the completion menu could show items that
          don't actually match any text in the buffer due to case mismatches

Solution: Instead of validating menu items only against the user-typed
          pattern, the new logic also checks whether the completed item
          matches actual buffer content. If needed, it retries the match
          using a lowercased version of the candidate, respecting
          smartcase semantics.

closes: vim/vim#17665

af22007784

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-07-08 08:07:42 +08:00
ed8b022633 Merge pull request #34841 from zeertzjq/vim-9.1.0877
vim-patch:9.1.{0877,1519}
2025-07-08 08:06:34 +08:00
842ca1fd5c vim-patch:9.1.1519: tests: Test_termdebug_decimal_breakpoints() may fail
Problem:  Test_termdebug_decimal_breakpoints() fails with List index out
          of range, because when adding the second breakpoint, the
          cursor is still on the very first line (a header include line)
          and therefore gdb refuses to set the breakpoint with:
          `msg="No compiled code for line 1 in file XTD_decimal.c"`
Solution: Run the program, so that it will break at the very first
          defined breakpoint and then once we are in the program,
          set further breakpoints

closes: vim/vim#17689

faed074ab7

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-07-08 07:22:25 +08:00
62822d750d vim-patch:9.1.0877: tests: missing test for termdebug + decimal signs
Problem:  tests: missing test for termdebug + decimal signs
Solution: Add a termdebug test (Ubaldo Tiberi)

closes: vim/vim#16081

b5c1557323

Co-authored-by: Ubaldo Tiberi <ubaldo.tiberi@volvo.com>
2025-07-08 07:22:25 +08:00
5fd386a893 Merge pull request #34828 from ncrpy/fix-get_keymap-lhsrawalt
fix(api): populate `lhsrawalt` in `nvim_get_keymap` response
2025-07-08 07:22:02 +08:00
0c973bf442 test(api): nvim_get_keymap returns correct lhsraw and lhsrawalt 2025-07-08 06:40:07 +08:00
d523750de0 fix(api): populate lhsrawalt in nvim_get_keymap response
Problem:
The `nvim_get_keymap()` function is missing the `lhsrawalt` field in its response for mappings with an alternate key representation. This makes its return value inconsistent with its documented `maparg()`-like structure and its formal type definition.

Solution:
Corrects the `keymap_array` function to pass the alternate mapping keys (`current_maphash->m_alt->m_keys`) to `mapblock_fill_dict`. The argument responsible for this was previously hardcoded to `NULL`.

For example, for a mapping of `<C-x>`, the API will now correctly return both `lhsraw` (`<80><fc>^DX`) and `lhsrawalt` (the alternate form, e.g., `^X`).
2025-07-08 06:40:07 +08:00
c3c8d25293 vim-patch:9.1.1521: completion: pum does not reset scroll pos on reopen with 'noselect' (#34836)
Problem:  When 'wildmode' is set to include "noselect", the popup menu (pum)
          incorrectly retained its scroll position when reopened. This
          meant that after scrolling down through the menu with `<C-n>`,
          reopening the menu (e.g., by retyping the command and
          triggering completion again) would show the menu starting from
          the previously scrolled position, rather than from the top.
          This could confuse users, as the first visible item would not
          be the first actual match in the list.

Solution: Ensure that the popup menu resets its scroll position to the
          top when reopened (Girish Palya).

closes: vim/vim#17673

0cd7f3536b

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-07-08 06:37:30 +08:00
2031287e93 feat(lsp): support diagnostic related information (#34474) 2025-07-07 13:05:02 -04:00
0d9bf5b89f vim-patch:244198f: runtime(autopkgtest): add ftplugin file for autopkgtest
closes: vim/vim#17679

244198f039

Co-authored-by: James McCoy <jamessan@jamessan.com>
2025-07-07 11:24:04 +02:00