Problem: input() does not handle composing characters properly.
Solution: Use mb_cptr2char_adv() instead of mb_ptr2char_adv().
(closesvim/vim#10527)
e3a529bc87
Cherry-pick all of Test_input_func() from patch 8.2.0316.
(cherry picked from commit 84ed71f319)
Problem: Openscad files are not recognized.
Solution: Add a filetype pattern. (Niklas Adam, closesvim/vim#10199)
c360b2566c
(cherry picked from commit b49c1adb20)
Problem: When 'formatoptions' contains "/" wrongly wrapping a long trailing
comment.
Solution: Pass the OPENLINE_FORMAT flag.
7e66778815
(cherry picked from commit 01167f2448)
Fix vim.lsp.buf.(range_)code_action() to only send diagnostics belonging
to the current buffer and not to other files in the workspace.
(cherry picked from commit e3d660e456)
Co-authored-by: Fredrik Ekre <ekrefredrik@gmail.com>
Problem: When 'shortmess' contains 'A' loading a session may still warn for
an existing swap file. (Melker Österberg)
Solution: Keep the 'A' flag to 'shortmess' in the session file.
(closesvim/vim#10443)
aaadb5b6f7
Use readfile() with "B" flag in test as readblob() needs patch 8.2.2343.
(cherry picked from commit 1d67dd16e2)
Problem: With 'smartindent' inserting '}' after completion goes wrong.
Solution: Check the cursor is in indent. (closesvim/vim#10420)
2e444bbef0
(cherry picked from commit dca0412d37)
Problem: Compiler warning for not initialized variable.
Solution: Initialize the variable. (John Marriott)
4c84dd33ad
(cherry picked from commit f9c8ba0b85)
Problem: Indent operator creates an undo entry for every line.
Solution: Create one undo entry for all lines. (closesvim/vim#10227)
e468698994
(cherry picked from commit f8b832b171)
Problem: Insufficient testing for indent.c.
Solution: Add indent tests. (Yegappan Lakshmanan, closesvim/vim#5736)
bd7206e02c
Cherry-pick Test_ex_mode() changes from Vim patches 8.2.{0342,0347}.
Reorder test_expand_func.vim to match upstream.
(cherry picked from commit c72857d396)
Problem: Changing 'switchbuf' may have no effect.
Solution: Handle 'switchbuf' in didset_string_options(). (Sean Dewar,
closesvim/vim#10406)
39c46b4378
Guess it doesn't hurt to cherry-pick didset_string_options from v8.1.2045
(but in option.c, for now).
(cherry picked from commit 809790b9f6)
It's special cased by the vimSubst syntax group, and isn't present in Vim's
vimCommand group.
For example, this fixes `call s:Foo()` highlighting `:` as Error in Nvim, as the
`s` is parsed as vimCommand rather than as vimUserFunc since
`contains=vimCommand` was added to vimUserFunc (and vimFunc) in a rt update.
Interestingly, `g:`, `l:`, etc. have the same issues due to :global, :list, etc.
Vim also has that problem, so it should ideally be fixed upstream.
We could also omit g[lobal] from vimCommand and rely on vimGlobal instead, but
it doesn't work in some cases, like when there's a `:` before the command. Also,
Vim matches only `g` in vimCommand for some reason, which doesn't produce any
highlight for `:global/foo/bar` (with Nvim you at least get some highlights on
the `global` bit despite the leading `:`).
Also, remove special handling of :py3 in syntax/vim.vim, as the generator seems
to have no problems finding it.
(cherry picked from commit 53780d9fd0)
* fix(lsp): fix unnecessary buffers being added on empty diagnostics
Some language servers send empty `textDocument/publishDiagnostics`
messages after indexing the project, sometimes resulting in creation
of a lot of unnecessary buffers. As a workaround, skip empty messages
for nonexistent buffers before resolving the filename to a bufnr.
(cherry picked from commit 26eb6785eb)
* Add test
(cherry picked from commit d2e9dab377)
Co-authored-by: ii14 <ii14@users.noreply.github.com>
The LSP progress handler would put non-progress messages (such as from
clangd or pyls; not part of the LSP spec) directly into
`client.messages`, while `vim.lsp.util.get_progress_messages()` would
try to fetch them from `client.messages.messages` instead (and come up
empty everytime). This would result in these messages never being
cleaned up by `get_progress_messages()`.
This commit fixes that by treating those messages like show-once
progress messages (by setting `done=true` immediately).
(cherry picked from commit 2087960c76)
Co-authored-by: Patrice Peterson <patrice.peterson@mailbox.org>
Problem: No text formatting for // comment after a statement.
Solution: format a comment when the 'c' flag is in 'formatoptions'.
48a8a83303
(cherry picked from commit a74c08d524)
Problem: Some users do not want a line comment always inserted.
Solution: Add the '/' flag to 'formatoptions' to not repeat the comment
leader after a statement when using "o".
2bf875f881
(cherry picked from commit d4b9aa4f8e)
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
Problem: "P" in Visual mode still changes some registers.
Solution: Make "P" in Visual mode not change any register. (Shougo
Matsushita, closesvim/vim#10349)
509142ab7a
(cherry picked from commit 28c74ef687)
Problem: When closing help window autocmds triggered for the wrong window.
Solution: Figure out the new current window earlier. (closesvim/vim#10348)
2a2707d033
(cherry picked from commit 71580dfef4)
Problem: :startinsert right after :stopinsert does not work when popup menu
is still visible.
Solution: Use ins_compl_active() instead of pum_visible(). (closesvim/vim#10352)
cd5dbad184
(cherry picked from commit 97d86c45af)
This avoids ignoring too many match results, and avoid highlighting
being blank in some files.
(cherry picked from commit e453b6391e)
Co-authored-by: Thomas Vigouroux <thomas.vigouroux@protonmail.com>