Commit Graph

22577 Commits

Author SHA1 Message Date
Mathias Fußenegger
f5d558c8ea
feat(lsp): provide feedback if server can't compute rename result (#19546)
Without some form of feedback a user cannot easily tell if the server is
still computing the result (which can take a while in large projects),
or whether the server couldn't compute the rename result.
2022-07-27 18:56:27 +02:00
Mathias Fußenegger
888f12858a
fix(lsp): set workspace.configuration capability (#19548)
Neovim implements `workspace/configuration`
It should set the capability accordingly.

From https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#clientCapabilities:

    /**
     * The client supports `workspace/configuration` requests.
     *
     * @since 3.6.0
     */
    configuration?: boolean;
2022-07-27 18:55:44 +02:00
Christian Clason
4c3104819b
vim-patch:9.0.0093: sway config files are recognized as i3config (#19545)
Problem:    Sway config files are recognized as i3config.
Solution:   Recognize swayconfig separately. (James Eapen, closes vim/vim#10672)
7abd1c6d8e
2022-07-27 18:11:59 +02:00
Gregory Anders
9b447c7ce5
vim-patch:9.0.0088: pattern for detecting bitbake files is not sufficient (#19547)
Problem:    Pattern for detecting bitbake files is not sufficient.
Solution:   Adjust the pattern. (Gregory Anders, closes vim/vim#10743)
30e212dac1
2022-07-27 10:06:09 -06:00
Dundar Goc
3a40d4b759 refactor: enable -Wconversion warning for search.c
Work on https://github.com/neovim/neovim/issues/567
2022-07-27 16:51:25 +02:00
zeertzjq
f57432af4d
vim-patch:9.0.0090: no error when assigning bool to a string option (#19539)
Problem:    No error when assigning bool to a string option with setwinvar().
Solution:   Give an error (closes vim/vim#10766)
28f84e17b0
2022-07-27 20:59:43 +08:00
Dundar Goc
335b49e129 refactor: enable -Wconversion warning for mbyte.c
Work on https://github.com/neovim/neovim/issues/567
2022-07-27 13:14:33 +02:00
James McCoy
e0f32abb1c
Merge pull request #19518 from dundargoc/build/openbsd/no-versions
ci(openbsd): don't specify versions for dependencies if possible
2022-07-27 06:27:51 -04:00
zeertzjq
57ce6c2b8f
Merge pull request #19531 from zeertzjq/vim-8.2.4623
vim-patch:8.2.{4623,4625}: coverity warnings
2022-07-27 12:27:42 +08:00
zeertzjq
bbad7371db vim-patch:8.2.4625: old Coverity warning for resource leak
Problem:    Old Coverity warning for resource leak.
Solution:   Call FreeWild() if expanding matches did not fail.
90da27b927
2022-07-27 12:00:56 +08:00
zeertzjq
f586131e57 vim-patch:8.2.4623: Coverity warns for using uninitialized field
Problem:    Coverity warns for using uninitialized field.
Solution:   Initialize he field to zero.
03a297c63f

Also only initialize used fields in f_fullcommand().
2022-07-27 12:00:52 +08:00
zeertzjq
79872f3770
fix(options): properly free string options (#19510) 2022-07-27 07:26:32 +08:00
zeertzjq
890d4023cd
vim-patch:9.0.0081: command line completion of user command may have duplicates (#19529)
Problem:    Command line completion of user command may have duplicates.
            (Dani Dickstein)
Solution:   Skip global user command if an identical buffer-local one is
            defined. (closes vim/vim#10797)
c2842adfb2
2022-07-27 07:25:47 +08:00
zeertzjq
2fdb0de197
Merge pull request #19528 from zeertzjq/vim-9.0.0051
vim-patch:9.0.{0051,0082,0083,0086}: cmdline fixes
2022-07-27 07:25:13 +08:00
zeertzjq
fc55f8263c vim-patch:9.0.0086: tabline is not redrawn when entering command line
Problem:    Tabline is not redrawn when entering command line.
Solution:   Set "redraw_tabline". (closes vim/vim#10771)
6791adca53
2022-07-27 06:32:40 +08:00
zeertzjq
0c0a2e4e52 vim-patch:9.0.0083: ModeChanged event not triggered when leaving cmdline window
Problem:    ModeChanged event not triggered when leaving the cmdline window.
Solution:   Call may_trigger_modechanged(). (closes vim/vim#10791)
c9e8fd6fc7

Code is already present in Nvim. Add some other related missing changes.
2022-07-27 06:23:47 +08:00
zeertzjq
9f1dc1466e vim-patch:9.0.0082: cannot interrupt global command from command line
Problem:    Cannot interrupt global command from command line.
Solution:   Reset got_int in another place. (closes vim/vim#10739)
3cfae39b08
2022-07-27 06:19:43 +08:00
zeertzjq
45e2bbae83 vim-patch:9.0.0051: using CTRL-C wih :append may hang Vim
Problem:    Using CTRL-C wih :append may hang Vim.
Solution:   Reset got_int. (closes vim/vim#10729, closes vim/vim#10728)
f754fe6a3d
2022-07-27 06:19:43 +08:00
dundargoc
49d2256ae5
build(gen_vimdoc): fall back to lua if luajit doesn't exist (#19498)
It currently falls back to texlua if luajit doesn't exist. However,
the documentation generation does not work with texlua. Instead use lua
as a fall back instead.
2022-07-27 00:17:11 +02:00
zeertzjq
289256337a
Merge pull request #19523 from ii14/vim-9.0.0085
vim-patch:9.0.0085: ":write" fails after ":file name" and the ":edit"
2022-07-27 05:58:27 +08:00
Christian Clason
7e939ddb87
vim-patch:9.0.0084: using "terraform" filetype for .tfvars file is bad (#19526)
Problem:    Using "terraform" filetype for .tfvars file is bad.
Solution:   use "terraform-vars", so that different completion and other
            mechanisms can be used. (Radek Simko, closes vim/vim#10755)
15b87b6610
2022-07-26 23:08:48 +02:00
ii14
4225e6ee46 vim-patch:9.0.0085: ":write" fails after ":file name" and the ":edit"
Problem:    ":write" fails after ":file name" and the ":edit".
Solution:   Reset BF_NOTEDITED when using ":edit". (closes vim/vim#10790)
1f0dc5e84f
2022-07-26 20:57:57 +02:00
Dundar Goc
d61a5a08ac ci(openbsd): don't specify versions for dependencies if possible
It's more convenient to not specify the version and let openbsd's
package manager figure it out. This will help us avoid manually bumping
dependency versions when a new version of openbsd is released.

Some packages have multiple versions and not specifying a version in
those cases fails the CI job, so providing a version seems to be
necessary for some key packages.
2022-07-26 17:27:26 +02:00
Christian Clason
2a9c9371bc
vim-patch:9.0.0073: too many files recognized as bsdl (#19504)
Problem:    Too many files recognized as bsdl.
Solution:   Use pattern "*.bsd" instead of "*bsd". (Martin Tournoij,
            closes vim/vim#10783)
1b67f07f76
2022-07-26 14:16:46 +02:00
zeertzjq
1a4753f25a
Merge pull request #19514 from zeertzjq/vim-8.1.1424
vim-patch:8.1.1424,9.0.0076: crash when popup menu is deleted while waiting for char
2022-07-26 20:03:02 +08:00
zeertzjq
27116a0159 vim-patch:9.0.0076: no test for what patch 8.1.1424 fixes
Problem:    No test for what patch 8.1.1424 fixes.
Solution:   Add a test. (closes vim/vim#10789)
92a1678d48
2022-07-26 19:37:17 +08:00
zeertzjq
ee8606d31f vim-patch:8.1.1424: crash when popup menu is deleted while waiting for char
Problem:    Crash when popup menu is deleted while waiting for char.
Solution:   Bail out when pum_array was cleared.
5c3fb04623
2022-07-26 19:36:24 +08:00
James McCoy
cbfae548e8
Merge pull request #19512 from dundargoc/build/version-fix
build: fix version generation to its previous behavior
2022-07-26 06:47:56 -04:00
Christian Clason
4cbeedf57b
vim-patch:b529cfbd04c0 (#19501)
Update runtime files
b529cfbd04
2022-07-26 11:26:23 +02:00
Dundar Goc
46bf1ec791 build: fix version generation to its previous behavior
This will change the version format from

v0.8.0-dev-nightly-12-g1a07044c1

to

v0.8.0-dev-698-ga5920e98f

Closes https://github.com/neovim/neovim/issues/19499
2022-07-26 11:22:31 +02:00
zeertzjq
1a07044c1c
revert: "vim-patch:9.0.0061: ml_get error with nested autocommand" (#19509)
This reverts commit 6cee15da72.

Port this again when https://github.com/vim/vim/issues/10780 is fixed.
2022-07-26 11:53:17 +08:00
zeertzjq
147cce29a6
fix(cmdline): trigger CmdlineEnter and ModeChanged earlier (#19474)
Match Vim's ordering in code.
These tests are unrelated to ext_cmdline. Move them out of that block.
2022-07-26 10:21:30 +08:00
James McCoy
88c6e02c12
Merge pull request #19508 from ii14/fix_older_cmake_makefiles
build: fix git version generation on makefiles with older cmake versions
2022-07-25 21:41:03 -04:00
ii14
ba662efb17 build: fix git version generation on makefiles with older cmake versions
When using a Makefile generator, older CMake versions are not building
custom targets when depending on their byproducts, making version
generation fail. (works on 3.19.4, fails on 3.10.2) As a workaround,
add a dependency on the custom target explicitly.
2022-07-26 02:03:13 +02:00
zeertzjq
fe159d23fd
vim-patch:9.0.0071: command overlaps with printed text in scrollback (#19505)
Problem:    Command overlaps with printed text in scrollback.
Solution:   Clear until end-of-line and use correct message chunk.
            (closes vim/vim#10765, closes vim/vim#10764)
ecdc82e74e

N/A patches for version.c:

vim-patch:9.0.0070: using utfc_ptr2char_len() when length is negative

Problem:    Using utfc_ptr2char_len() when length is negative.
Solution:   Check value of length. (closes vim/vim#10760)
4dc513a22c
2022-07-26 07:30:33 +08:00
Dalius Dobravolskas
3ded2ab55a
feat(lsp): allow passing custom list handler to LSP functions that return lists (#19213)
Currently LSP allows only using loclist or quickfix list window. I
normally prefer to review all quickfix items without opening quickfix
window. This fix allows passing `on_list` option which allows full
control what to do with list.

Here is example how to use it with quick fix list:

```lua
local function on_list(options)
  vim.fn.setqflist({}, ' ', options)
  vim.api.nvim_command('cfirst')
end

local bufopts = { noremap=true, silent=true, buffer=bufnr }
vim.keymap.set('n', '<leader>ad', function() vim.lsp.buf.declaration{on_list=on_list} end, bufopts)
vim.keymap.set('n', '<leader>d', function() vim.lsp.buf.definition{on_list=on_list} end, bufopts)
vim.keymap.set('n', '<leader>ai', function() vim.lsp.buf.implementation{on_list=on_list} end, bufopts)
vim.keymap.set('n', '<leader>at', function() vim.lsp.buf.type_definition{on_list=on_list} end, bufopts)
vim.keymap.set('n', '<leader>af', function() vim.lsp.buf.references(nil, {on_list=on_list}) end, bufopts)
```

If you prefer loclist do something like this:

```lua
local function on_list(options)
  vim.fn.setloclist(0, {}, ' ', options)
  vim.api.nvim_command('lopen')
end
```

close #19182

Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
2022-07-25 23:02:51 +02:00
zeertzjq
7961f79904
Merge pull request #19494 from zeertzjq/vim-8.2.5155
vim-patch:8.2.{5155,5163,5164,5166}: diff fixes
2022-07-25 21:32:30 +08:00
dundargoc
e12035fc0c
build(lint): check uncrustify version #19468
This to prevent the user from accidentally using the wrong uncrustify
version.
2022-07-25 06:18:49 -07:00
zeertzjq
e4079f3b5a vim-patch:8.2.5166: test for DiffUpdated fails
Problem:    Test for DiffUpdated fails.
Solution:   Also accept a count of two.
f65cc665fa
2022-07-25 20:48:21 +08:00
zeertzjq
771564b00e vim-patch:8.2.5164: invalid memory access after diff buffer manipulations
Problem:    Invalid memory access after diff buffer manipulations.
Solution:   Use zero offset when change removes all lines in a diff block.
c101abff4c
2022-07-25 20:48:21 +08:00
zeertzjq
8543de3a86 vim-patch:8.2.5163: crash when deleting buffers in diff mode
Problem:    Crash when deleting buffers in diff mode.
Solution:   Recompute diffs later.  Skip window without a valid buffer.
cd38bb4d83
2022-07-25 20:48:21 +08:00
zeertzjq
611b43369e vim-patch:8.2.5155: in diff mode windows may get out of sync
Problem:    In diff mode windows may get out of sync. (Gary Johnson)
Solution:   Avoid that the other window scrolls for 'cursorbind'.
a315ce1f32
2022-07-25 20:30:35 +08:00
zeertzjq
e12c62c1f7
Merge pull request #19470 from zeertzjq/vim-8.2.4866
vim-patch:8.2.4866,9.0.0066: duplicate code in "get" functions
2022-07-25 20:29:34 +08:00
zeertzjq
ad57610ac7 vim-patch:9.0.0066: switching window uneccarily when getting buffer options
Problem:    Switching window uneccarily when getting buffer options.
Solution:   Do not switch window when getting buffer options. (closes vim/vim#10767)
cd6ad6439d
2022-07-25 20:01:59 +08:00
zeertzjq
56ed5a0403 vim-patch:8.2.4866: duplicate code in "get" functions
Problem:    Duplicate code in "get" functions.
Solution:   Use get_var_from() for getwinvar(), gettabvar(), gettabwinvar()
            and getbufvar(). (closes vim/vim#10335)
47d4e317f8

f_setbufvar() can use tv_get_buf_from_arg() as it sets emsg_off.
2022-07-25 20:01:59 +08:00
zeertzjq
6e9a7e7db8
Merge pull request #19493 from zeertzjq/vim-8.2.1469
vim-patch:8.2.{1469,2254,2284,2285,2969,4228}: option fixes and refactorings
2022-07-25 19:01:48 +08:00
Vedant
6c26d0b068
ci(distribution): auto-release winget #19121
- forked winget-pkgs to https://github.com/neovim/winget-pkgs
- key stored in WINGET_TOKEN at https://github.com/neovim/neovim/settings/secrets/actions
- deploy key public key stored at https://github.com/neovim/winget-pkgs/settings/keys
2022-07-25 03:58:16 -07:00
zeertzjq
aba3147cb6 vim-patch:8.2.4228: no tests for clicking in the GUI tabline
Problem:    No tests for clicking in the GUI tabline.
Solution:   Add test functions to generate the events.  Add tests using the
            functions. (Yegappan Lakshmanan, closes vim/vim#9638)
b0ad2d92fd
2022-07-25 18:20:47 +08:00
zeertzjq
d8df9afad6 vim-patch:8.2.2969: subtracting from number option fails when result is zero
Problem:    Subtracting from number option fails when result is zero. (Ingo
            Karkat)
Solution:   Reset the string value when using the numeric value.
            (closes vim/vim#8351)
a42e6e0082

Cherry-pick Test_compound_assignment_operators() changes from patch 8.2.1593
2022-07-25 18:20:47 +08:00
zeertzjq
963ea726da vim-patch:8.2.2285: Vim9: cannot set an option to a false
Problem:    Vim9: cannot set an option to a false.
Solution:   For VAR_BOOL use string "0". (closes vim/vim#7603)
b0d8182fa3
2022-07-25 18:20:47 +08:00