`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.
Problem: Scrollback can be wrong after redrawing the command line.
Solution: Clear unfinished scrollback when redrawing. (closesvim/vim#10807)
46af7bc08d
Problem: Cursor restored unexpected with nested autocommand.
Solution: Do not restore the cursor when it was moved intentionally.
(closesvim/vim#10780)
3d6ee8bda0
Problem: When switching window in autocmd the restored cursor position may
be wrong.
Solution: Do not restore the cursor if it was not set. (closesvim/vim#10775)
b03950fafa
This patch cannot be fully ported because it depends on patch 8.2.3518.
Problem: The ins_complete() function is much too long.
Solution: Split it up into multiple functions. (Yegappan Lakshmanan,
closesvim/vim#9414)
bf7ff61af4
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
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.
Problem: Coverity warns for using uninitialized field.
Solution: Initialize he field to zero.
03a297c63f
Also only initialize used fields in f_fullcommand().
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. (closesvim/vim#10797)
c2842adfb2
Problem: ModeChanged event not triggered when leaving the cmdline window.
Solution: Call may_trigger_modechanged(). (closesvim/vim#10791)
c9e8fd6fc7
Code is already present in Nvim. Add some other related missing changes.
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.
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, closesvim/vim#10755)
15b87b6610
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.