Commit Graph

31323 Commits

Author SHA1 Message Date
zeertzjq
bf5c1346c5
vim-patch:ea0e41a: runtime(doc): make tag alignment more consistent in filetype.txt (#31459)
closes: vim/vim#16169

ea0e41a115

Omit Lua folding.

N/A patch:
vim-patch:fdfcce5: runtime(lua): add optional lua function folding
2024-12-06 07:22:44 +08:00
Jeremy Fleischman
fd902b1cb2
fix(diagnostic): only store quickfix id when creating a new one #31466
The old code would always update `_qf_id` with the current quickfix,
even if you're currently looking at a completely different,
non-diagnostics quickfix list. This completely defeats the intent of
<https://github.com/neovim/neovim/pull/30868>, whoops!
2024-12-05 13:59:33 -08:00
Justin M. Keyes
12901447cb
docs: graduate intro.txt to "flow layout" #31462
- move credits and backers to credits.txt
2024-12-05 07:18:27 -08:00
vanaigr
fccef5ec35 refactor: comments, variable names 2024-12-05 08:45:22 -06:00
vanaigr
c57397f981 docs: add comments for DecorRangeSlot struct 2024-12-05 08:45:22 -06:00
vanaigr
3abd7ed4a4 perf: consider only active decorations when drawing lines 2024-12-05 08:45:22 -06:00
Justin M. Keyes
845e563421
Merge #31451 docs 2024-12-05 04:02:34 -08:00
zeertzjq
8323398bc6
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:03:58 +08:00
glepnir
6a929b15c9
vim-patch:9.1.0903: potential overflow in spell_soundfold_wsal() (#31456)
Problem:  potential overflow in spell_soundfold_wsal()
Solution: Protect wres from buffer overflow, by checking the
          length (Zdenek Dohnal)

Error: OVERRUN (CWE-119):
vim91/src/spell.c:3819: cond_const: Checking "reslen < 254" implies that
"reslen" is 254 on the false branch.
vim91/src/spell.c:3833: incr: Incrementing "reslen". The value of "reslen"
is now 255.
vim91/src/spell.c:3792: overrun-local: Overrunning array "wres" of 254
4-byte elements at element index 254 (byte offset 1019) using index
"reslen - 1" (which evaluates to 254).
 3789|   		    {
 3790|   			// rule with '<' is used
 3791|-> 			if (reslen > 0 && ws != NULL && *ws != NUL
 3792|   				&& (wres[reslen - 1] == c
 3793|   						    || wres[reslen - 1] == *ws))

Error: OVERRUN (CWE-119):
vim91/src/spell.c:3819: cond_const: Checking "reslen < 254" implies that
"reslen" is 254 on the false branch.
vim91/src/spell.c:3833: overrun-local: Overrunning array "wres" of 254
4-byte elements at element index 254 (byte offset 1019) using index
"reslen++" (which evaluates to 254).
 3831|                         {
 3832|                             if (c != NUL)
 3833|->                               wres[reslen++] = c;
 3834|                             mch_memmove(word, word + i + 1,
 3835|                                        sizeof(int) * (wordlen -
(i + 1) + 1));

related: vim/vim#16163

39a94d2048

Co-authored-by: Zdenek Dohnal <zdohnal@redhat.com>
2024-12-05 09:51:58 +00:00
glepnir
2f5e7cbac4
vim-patch:9.1.0905: Missing information in CompleteDone event (#31455)
Problem:  Missing information in CompleteDone event
Solution: add complete_word and complete_type to v:event dict
          (glepnir)

closes: vim/vim#16153

1c5a120a70
2024-12-05 17:49:39 +08:00
zeertzjq
540def7d2c
test(system_spec): check for .git dir before using git (#31458) 2024-12-05 09:13:22 +00:00
Justin M. Keyes
5413c6475e docs: graduate gui.txt to "flow layout" 2024-12-05 01:38:44 +01:00
Lewis Russell
8f84167c30 refactor(runtime.c): misc 2024-12-04 16:26:04 +00:00
Gregory Anders
0a15cd2500
misc: keep deprecated vim.loader.disable stub (#31450)
Transitional stub to minimize breaking change pain, to be removed after
0.11 release.
2024-12-04 10:17:46 -06:00
Gregory Anders
52481eecf0
docs: mention new terminal defaults (#31449) 2024-12-04 10:17:19 -06:00
Jeremy Fleischman
7579af3c51
feat(diagnostic): vim.diagnostic.setqflist improvements #30868
1. Use the new "u" action to update the quickfix list so we don't lose
   our position in the quickfix list when updating it.
2. Rather than creating a new quickfix list each time, update the
   exiting one if we've already created one.
2024-12-04 07:49:57 -08:00
Justin M. Keyes
6586645d78 docs: help tags for neovim.io searches 2024-12-04 16:34:44 +01:00
luukvbaal
e2a91876ac
test(screen): adjust screen state per stylua #31441
Before:
screen:expect({        | screen:expect({
  grid = [[            |   grid = [[
    {10:>!}a        |  |     line ^1                   |
    {7:  }b        |   |     {1:~                        }|*4
    {10:>>}c        |  |   ]], messages={ {
    {7:  }^         |  |     content = { { "\ntest\n[O]k: ", 6, 11 } },
    {1:~          }|*9 |     kind = "confirm"
               |       |   } }
  ]]                   | })
})

After:
screen:expect([[         | screen:expect({
  {10:>!}a            |  |   grid = [[
  {7:  }b            |   |     line ^1                   |
  {10:>>}c            |  |     {1:~                        }|*4
  {7:  }^             |  |   ]],
  {1:~              }|*9 |   messages = { {
                 |       |     content = { { "\ntest\n[O]k: ", 6, 11 } },
]])                      |     kind = "confirm"
                         |   } },
                         | })
2024-12-04 07:31:08 -08:00
Justin M. Keyes
6551e30630
Merge #31358 fix test failures for release / tarball builds 2024-12-04 07:20:04 -08:00
Lewis Russell
734dba04d1 fix(vim.system): close pipe handles after process handle
Fixes #30846
2024-12-04 14:44:40 +00:00
Gregory Anders
56d11b494b
defaults: disable 'number', 'relativenumber', and 'signcolumn' in terminal buffers (#31443) 2024-12-04 08:40:01 -06:00
luukvbaal
3cb1e825e6
fix(column): check if signcolumn changed in all windows #31439 2024-12-04 05:20:24 -08:00
Maria José Solano
e56437cd48
feat(lsp): deprecate vim.lsp.start_client #31341
Problem:
LSP module has multiple "start" interfaces.

Solution:
- Enhance vim.lsp.start
- Deprecate vim.lsp.start_client
2024-12-04 05:14:47 -08:00
zeertzjq
b079a9d2e7
vim-patch:9.1.0902: filetype: Conda configuration files are not recognized (#31445)
Problem:  filetype: Conda configuration files are not recognized
Solution: detect '.condarc' and 'condarc' files as yaml filetype.
          (zeertzjq)

closes: vim/vim#16162

876de275cb
2024-12-04 17:49:12 +08:00
Justin M. Keyes
ae93c7f369
docs: misc, help tags for neovim.io searches #31428
Problem:
Various keywords are commonly searched-for on https://neovim.io, but
don't have help tags.

Solution:
Add help tags.

fix #31327
2024-12-03 09:44:28 -08:00
wzy
2495e7e22a
fix(clipboard): tmux clipboard depends on $TMUX #31268
Problem:
tmux clipboard not used when tmux is a daemon and $TMUX is empty.

Solution:
If `tmux list-buffers` succeeds, use tmux clipboard.
2024-12-03 05:06:54 -08:00
JD
0e299ebf75
fix(decorator): noisy errors from decoration provider #31418
Problem:
A broken decoration provider can cause endless errors. #27235

Solution:
Don't show decorator errors when they exceed `DP_MAX_ERROR`.
2024-12-03 03:41:37 -08:00
James McCoy
48bdbf12d0
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-03 06:34:07 -05:00
James McCoy
c410375d4d
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-03 06:31:09 -05:00
James McCoy
9123bc0f3f
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-03 06:31:09 -05:00
James McCoy
25bd2782a5
test(version_spec): expect vim.NIL, not nil, for "build" if not in a git clone 2024-12-03 06:31:09 -05:00
James McCoy
e5d96a69fd
test(main_spec): use CMakePresets.json instead of .git for root marker 2024-12-03 06:31:09 -05:00
James McCoy
05dd41f3e9
ci(test): remove the .git directory for Linux
Tests should not rely on being run inside a git clone, so the Linux
builds cover this use case. The macOS builds will continue running with
the .git directory so there's still unix-ish coverage within a git
clone.
2024-12-03 06:31:09 -05:00
James McCoy
747e84a256
ci: run one set of tests with a release build
This ensures that no tests fail due to differences between release and debug builds.

The release build-type check is now unnecessary, too, so remove it.
2024-12-03 06:31:01 -05:00
James McCoy
588ca99e12
Merge pull request #31408 from jamessan/vterm-test-fixture
test(vterm): move test functions into vterm_test fixture
2024-12-03 04:30:42 -07:00
James McCoy
7a367c6967
test(vterm): move test functions into vterm_test fixture
In order to run unittests with a release build, we need the test
functions to be accessible when NDEBUG is defined. Moving the functions
into the test fixture ensures they are available and only available for
use by the unit tests.
2024-12-02 21:49:14 -05:00
zeertzjq
3d3a99e69c
vim-patch:9.1.0900: Vim9: digraph_getlist() does not accept bool arg (#31431)
Problem:  Vim9: digraph_getlist() does not accept bool argument
          (Maxim Kim)
Solution: accept boolean as first argument (Yegappan Lakshmanan)

fixes: vim/vim#16154
closes: vim/vim#16159

198ada3d9f

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2024-12-03 00:32:23 +00:00
Gregory Anders
49d6cd1da8
docs: provide example for configuring LSP foldexpr (#31411)
Using the "supports_method" function with a client capability inside of
an LspAttach autocommand is the preferred method to do this, so we
should be showing users how to do it.
2024-12-02 12:13:09 -06:00
luukvbaal
c7ec010ade
fix(extmark): builtin completion can still affect nearby extmarks #31387
Problem:
Built-in completion can still affect nearby extmarks. #31384

Solution:
Restore extmarks when completion leader changes.
2024-12-02 06:11:38 -08:00
luukvbaal
9d0117fd30
test(treesitter): global highlight definitions and fold test #31407
Add test for foldtext= highlighting. Change file to global highlight
definitions while at it.
2024-12-02 06:08:26 -08:00
Justin M. Keyes
716adbcc45
fix(api): deprecate nvim_subscribe, nvim_unsubscribe #30456
Problem:
- nvim_subscribe, nvim_unsubscribe were deprecated in
  aec4938a21 but this wasn't set in the
  API metadata.
- The function annotations
  ```
  FUNC_API_SINCE(1) FUNC_API_REMOTE_ONLY FUNC_API_DEPRECATED_SINCE(13)
  ```
  cause this test to fail:
   ```
   RUN T3 api metadata functions are compatible with old metadata or have new level: 3.00 ms ERR
   test/functional/api/version_spec.lua:135: function vim_subscribe was removed but exists in level 0 which nvim should be compatible with
   stack traceback:
     test/functional/api/version_spec.lua:135: in function <test/functional/api/version_spec.lua:128>
   ```

Solution:
- Set the API metadata.
- Rearrange the annotations so that FUNC_API_DEPRECATED_SINCE is 2nd:
  ```
  FUNC_API_SINCE(1) FUNC_API_DEPRECATED_SINCE(13) FUNC_API_REMOTE_ONLY
  ```
2024-12-02 04:16:44 -08:00
dundargoc
c1378413c1 vim-patch:768728b: runtime(doc): Update documentation for "noselect" in 'completeopt'
In particular, make the distinction and interaction between "noinsert"
and "noselect" clearer as it was very confusing before.

closes: vim/vim#16148

768728b487

Co-authored-by: dundargoc <gocdundar@gmail.com>
2024-12-02 08:23:10 +01:00
Christian Clason
36b714e9b7 vim-patch:9a39483: runtime(typst): provide a formatlistpat in ftplugin
closes: vim/vim#16134

9a39483adb

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2024-12-02 08:19:50 +01:00
zeertzjq
6cdcac4492
fix(ui): clamp 'cmdheight' for other tabpages on screen resize (#31419) 2024-12-02 10:05:49 +08:00
Evgeni Chasnovski
8de1dc6923
fix(api): make nvim_set_hl() respect all cterm attributes (#31390) 2024-12-02 08:24:58 +08:00
zeertzjq
fb689d7ebd
vim-patch:9.1.0899: default for 'backspace' can be set in C code (#31416)
Problem:  default for 'backspace' can be set in C code
Solution: promote the default for 'backspace' from defaults.vim to the C
          code (Luca Saccarola)

closes: vim/vim#16143

959ef61430

N/A patches:
vim-patch:9.1.0895: default history value is too small
vim-patch:075aeea: runtime(doc): document changed default value for 'history'

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2024-12-02 00:06:57 +00:00
C.D. MacEachern
feb62d5429
docs: example keybind for :Inspect #31391 2024-12-01 13:58:28 -08:00
zeertzjq
ab9cfc4dc3
Merge pull request #31370 from glepnir/vim-9.1.0867
vim-patch:9.1.{0867,0891,0896}
2024-11-30 20:46:46 +08:00
Christian Clason
9d174a7dac vim-patch:9.1.0898: runtime(compiler): pytest compiler not included
Problem:  runtime(compiler): pytest compiler not included
Solution: include pytest compiler, update the compiler completion test
          (Konfekt)

closes: vim/vim#16130

3c2596a9e9

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2024-11-30 13:40:08 +01:00
glepnir
1af1e918d3 vim-patch:9.1.0896: completion list wrong after v9.1.0891
Problem:  completion list wrong after v9.1.0891
Solution: update compl_mach_array after leader change
          (glepnir)

compl_shown_match update not correct after refactoring in v9.1.0891
Unfortunately, this regressed what item is selected after leader change.

So generate compl_match_array before updating compl_shown_match range,
and split generate compl_match_array into range match_head

fixes: https://github.com/vim/vim/issues/16128
closes: https://github.com/vim/vim/pull/16129

a49c077a88
2024-11-30 20:22:53 +08:00