Commit Graph

22411 Commits

Author SHA1 Message Date
Christian Clason
6237ac8402
vim-patch:2ecbe53f452e (#19577)
Update runtime files
2ecbe53f45
2022-07-30 15:48:32 +02:00
zeertzjq
d36d9be8ff
fix(terminal): avoid reading over the end of cell.chars (#19580) 2022-07-30 21:40:30 +08:00
dundargoc
c34d72bf7c
refactor: enable -Wconversion warning for spell.c (#19538)
Work on https://github.com/neovim/neovim/issues/567
2022-07-30 20:59:34 +08:00
zeertzjq
e59bc078de
fix(screen): check for col instead of vcol when drawing fold (#19572) 2022-07-29 21:47:21 +08:00
zeertzjq
02efdb4d58
refactor: fix clang and PVS warnings (#19569)
The last commit didn't actually disable V1028 because of a typo.
Fix the typo so it is actually disabled.
2022-07-29 14:44:18 +08:00
zeertzjq
0b8bade493
build(pvscheck): disable PVS/V1028 (#19553)
Most casts where PVS warns for V1028 aren't added to prevent overflows
in the first place, but to avoid other warnings, like printf argument or
-Wconversion warnings. PVS/V1028 is more annoying than useful.
2022-07-29 10:32:00 +08:00
dundargoc
1ebe7cd160
refactor: enable -Wconversion warning for syntax.c (#19533)
Work on https://github.com/neovim/neovim/issues/567
2022-07-29 10:05:29 +08:00
zeertzjq
88ed33230a
vim-patch:9.0.0101: invalid memory access in diff mode with "dp" and undo (#19568)
Problem:    Invalid memory access in diff mode with "dp" and undo.
Solution:   Make sure the line number does not go below one.
4e677b9c40
2022-07-29 07:31:54 +08:00
zeertzjq
352a177dae
vim-patch:9.0.0026: accessing freed memory with diff put (#19564)
Problem:    Accessing freed memory with diff put.
Solution:   Bail out when diff pointer is no longer valid.
c5274dd122
2022-07-29 06:53:32 +08:00
Mathias Fußenegger
b25abbf4b8
docs(lsp): use direct link to formattingOptions in format docs (#19558)
Also changes `@see` to `See` to avoid the break to a dedicated "See
also" block in the generated vimdoc
2022-07-28 19:41:30 +02:00
Mathias Fußenegger
98915f88b2
feat(lsp): add range option to code_action; deprecate range_code_action (#19551)
`code_action` gained extra functions (`filter` and `apply`) which
`range_code_action` didn't have.

To close this gap, this adds a `range` option to `code_action` and
deprecates `range_code_action`.

The option defaults to the current selection if in visual mode.
This allows users to setup a mapping like `vim.keymap.set({'v', 'n'},
'<a-CR>', vim.lsp.buf.code_action)`

`range_code_action` used to use the `<` and `>` markers to get the
_last_ selection which required using a `<Esc><Cmd>lua
vim.lsp.buf.range_code_action()<CR>` (note the `<ESC>`) mapping.
2022-07-28 19:19:07 +02:00
Christian Clason
468b1a689a
build(deps): bump LuaJIT to HEAD - a7d026548 (#19565) 2022-07-28 18:02:26 +02:00
Thomas Vigouroux
161efc9ea4
Merge pull request #19486 from dundargoc/refactor/conversion
refactor: enable -Wconversion warning for lua/treesitter.c
2022-07-28 14:31:26 +02:00
zeertzjq
f254fc67a5
vim-patch:9.0.0099: scrollback can be wrong after redrawing the command line (#19562)
Problem:    Scrollback can be wrong after redrawing the command line.
Solution:   Clear unfinished scrollback when redrawing. (closes vim/vim#10807)
46af7bc08d
2022-07-28 20:07:32 +08:00
zeertzjq
9cb8b5f8db
vim-patch:9.0.0097: long quickfix line is truncated for :clist (#19561)
Problem:    Long quickfix line is truncated for :clist.
Solution:   Allocate a buffer if needed.
5f30e26f69
2022-07-28 19:49:18 +08:00
dundargoc
b4e12bfa00
refactor: enable -Wconversion warning for spellfile.c (#19527)
Work on https://github.com/neovim/neovim/issues/567
2022-07-28 18:49:46 +08:00
Dundar Goc
7304b7eee3
refactor: enable -Wconversion warning for lua/treesitter.c
Work on https://github.com/neovim/neovim/issues/567
2022-07-28 12:13:06 +02:00
Christian Clason
b971547c54
build(deps): bump LuaJIT to HEAD - e1339aed3 (#19536) 2022-07-28 09:18:22 +02:00
zeertzjq
fe254fb7e7
Merge pull request #19556 from zeertzjq/vim-9.0.0061
vim-patch:9.0.{0061,partial:0077,0094}
2022-07-28 12:22:00 +08:00
zeertzjq
0134a2cb3e vim-patch:9.0.0094: cursor restored unexpected with nested autocommand
Problem:    Cursor restored unexpected with nested autocommand.
Solution:   Do not restore the cursor when it was moved intentionally.
            (closes vim/vim#10780)
3d6ee8bda0
2022-07-28 11:40:35 +08:00
zeertzjq
394d65494a vim-patch:partial:9.0.0077: wrong restored cursor position when switching window in autocmd
Problem:    When switching window in autocmd the restored cursor position may
            be wrong.
Solution:   Do not restore the cursor if it was not set. (closes vim/vim#10775)
b03950fafa

This patch cannot be fully ported because it depends on patch 8.2.3518.
2022-07-28 11:38:02 +08:00
zeertzjq
8e67af1b20 vim-patch:9.0.0061: ml_get error with nested autocommand
Problem:    ml_get error with nested autocommand.
Solution:   Also check line numbers for a nested autocommand. (closes vim/vim#10761)
5fa9f23a63
2022-07-28 11:38:02 +08:00
zeertzjq
bdbf843031
vim-patch:8.2.3912: the ins_complete() function is much too long (#19555)
Problem:    The ins_complete() function is much too long.
Solution:   Split it up into multiple functions. (Yegappan Lakshmanan,
            closes vim/vim#9414)
bf7ff61af4
2022-07-28 11:35:13 +08:00
zeertzjq
f1c01e5f94
Merge pull request #19554 from zeertzjq/vim-9.0.0095
vim-patch:9.0.{0095,0096}: remove dead code
2022-07-28 07:17:11 +08:00
zeertzjq
721ea8fab2 vim-patch:9.0.0096: flag "new_value_alloced" is always true
Problem:    Flag "new_value_alloced" is always true.
Solution:   Remove "new_value_alloced". (closes vim/vim#10792)
f6782732ab
2022-07-28 06:48:36 +08:00
zeertzjq
e6b7f70294 vim-patch:9.0.0095: conditions are always true
Problem:    Conditions are always true.
Solution:   Remove useless conditions. (closes vim/vim#10802)
122dea7007
2022-07-28 06:45:22 +08:00
dundargoc
e0eebe3087
refactor: enable -Wconversion warning for window.c (#19537)
Work on https://github.com/neovim/neovim/issues/567
2022-07-27 23:39:52 +01:00
dundargoc
dadb0d6f01
refactor: enable -Wconversion warning for eval/funcs.c (#19541)
Work on https://github.com/neovim/neovim/issues/567
2022-07-27 23:37:39 +01:00
Lewis Russell
d27e4d657b
perf(api): optimize nvim_cmd (#19513)
Reduce the amount of string allocations and length calculations.

With the following benchmark:

```lua
total = 0
for _ = 1, loops do
  local start = now()
  vim.api.nvim_cmd({cmd = 'let', args = {'a', '=', '1'}}, {})
  total = total + (now() - start)
end
print('nvim_cmd', total / loops)
```

```
hyperfine 'nvim --clean test.lua +source +q'
```

Before: 234.5ms
After:  173.8ms
2022-07-27 23:35:01 +01:00
dundargoc
48608a1f46
refactor: enable -Wconversion warning for regexp files (#19521)
Work on https://github.com/neovim/neovim/issues/567
2022-07-28 06:08:20 +08:00
zeertzjq
e0c433833f
refactor: fix clang and PVS warnings (#19532) 2022-07-28 06:05:33 +08:00
zeertzjq
7d9e68669c
vim-patch:9.0.0092: plugins cannot change v:completed_item (#19542)
Problem:    Plugins cannot change v:completed_item.
Solution:   Make v:completed_item writeable. (Shougo Matsushita,
            closes vim/vim#10801)
61021aa318
2022-07-28 05:19:38 +08:00
bfredl
b6b9f46041
Merge pull request #19525 from dundargoc/refactor/conversion-search
refactor: enable -Wconversion warning for search.c
2022-07-27 19:07:45 +02:00
bfredl
18755c6b89
Merge pull request #19516 from dundargoc/refactor/conversion-mbyte
refactor: enable -Wconversion warning for mbyte.c
2022-07-27 19:00:40 +02:00
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