Commit Graph

21367 Commits

Author SHA1 Message Date
1496f4212b fix(input): allow Ctrl-C to interrupt a recursive mapping even if mapped
(cherry picked from commit 56895cf4de)
2022-06-07 04:45:25 +00:00
f0f63502ce Merge pull request #18873 from neovim/backport-18872-to-release-0.7
[Backport release-0.7] vim-patch:8.2.5058: input() does not handle composing characters properly
2022-06-06 06:32:46 +08:00
df19f086ba Merge pull request #18874 from neovim/backport-18831-to-release-0.7
[Backport release-0.7] ci(provider): skip perl provider tests on macos
2022-06-06 06:32:07 +08:00
0e10b17164 ci(provider): skip installing perl provider on macOS
The macOS CI jobs fail to properly install the perl provider, making the
entire thing fail.

(cherry picked from commit 79bf507449)
2022-06-05 22:04:01 +00:00
6768784feb vim-patch:8.2.5058: input() does not handle composing characters properly
Problem:    input() does not handle composing characters properly.
Solution:   Use mb_cptr2char_adv() instead of mb_ptr2char_adv().
            (closes vim/vim#10527)
e3a529bc87

Cherry-pick all of Test_input_func() from patch 8.2.0316.

(cherry picked from commit 84ed71f319)
2022-06-05 21:46:39 +00:00
2146a48587 Merge pull request #18751 from neovim/backport-18138-to-release-0.7
[Backport release-0.7] vim-patch:8.2.4767: openscad files are not recognized
2022-05-26 10:52:58 +08:00
b43eed7d91 vim-patch:8.2.4767: openscad files are not recognized
Problem:    Openscad files are not recognized.
Solution:   Add a filetype pattern. (Niklas Adam, closes vim/vim#10199)
c360b2566c
(cherry picked from commit b49c1adb20)
2022-05-26 01:57:19 +00:00
ec40fef0af Merge pull request #18699 from dundargoc/backport/commitlint
ci(commitlint): only trigger on PRs to master #18679
2022-05-24 07:02:39 -04:00
811ee04030 Merge pull request #18718 from neovim/backport-18717-to-release-0.7
[Backport release-0.7] vim-patch:8.2.5008: when 'formatoptions' contains "/" wrongly wrapping comment
2022-05-23 22:03:25 +08:00
9876db1aa5 vim-patch:8.2.5008: when 'formatoptions' contains "/" wrongly wrapping comment
Problem:    When 'formatoptions' contains "/" wrongly wrapping a long trailing
            comment.
Solution:   Pass the OPENLINE_FORMAT flag.
7e66778815
(cherry picked from commit 01167f2448)
2022-05-23 13:28:37 +00:00
1677548ebc ci(commitlint): only trigger on PRs to master #18679
This will prevent a failure for backported PRs as they use a different
commit message.
2022-05-22 18:23:42 +02:00
0dc5bcd072 Merge pull request #18680 from dundargoc/backport-autocmd
[Backport] fix(autocmds): separate command from desc
2022-05-22 08:29:11 +08:00
3a1e8ef881 fix(autocmds): separate command from desc (#18617) 2022-05-21 17:16:56 +02:00
cb1b4bbeae fix(lsp): only send diagnostics from current buffer in code_action() (#18655)
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>
2022-05-21 16:02:38 +02:00
7af873f9d5 Merge pull request #18647 from neovim/backport-18636-to-release-0.7
[Backport release-0.7] vim-patch:8.2.4980: when 'shortmess' contains 'A' loading session may still warn
2022-05-20 08:05:38 +08:00
479f41aa89 vim-patch:8.2.4980: when 'shortmess' contains 'A' loading session may still warn
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.
            (closes vim/vim#10443)
aaadb5b6f7

Use readfile() with "B" flag in test as readblob() needs patch 8.2.2343.

(cherry picked from commit 1d67dd16e2)
2022-05-19 23:29:29 +00:00
01d0d2ce64 build(deps): bump Luv to HEAD - c51e7052e (#18517)
(cherry picked from commit 7c9ee0347b)

Co-authored-by: Christian Clason <c.clason@uni-graz.at>
2022-05-19 09:17:54 +02:00
f3ffb73b18 fix(health): return 0 if file not exists (#18612)
(cherry picked from commit 1d000e8248)

Co-authored-by: noval <noval.dev@protonmail.com>
2022-05-17 20:44:15 +02:00
4afadaf9d1 Merge pull request #18571 from neovim/backport-18567-to-release-0.7
[Backport release-0.7] vim-patch:8.2.{4951,4953}: with 'si' inserting char after completion goes wrong
2022-05-14 22:30:02 +08:00
107694acdc vim-patch:8.2.4953: with 'si' inserting '}' after completion goes wrong
Problem:    With 'smartindent' inserting '}' after completion goes wrong.
Solution:   Check the cursor is in indent.  (closes vim/vim#10420)
2e444bbef0
(cherry picked from commit dca0412d37)
2022-05-14 13:44:11 +00:00
58dd142090 vim-patch:8.2.4951: smart indenting done when not enabled
Problem:    Smart indenting done when not enabled.
Solution:   Check option values before setting can_si. (closes vim/vim#10420)
de5cf28781
(cherry picked from commit 24eb1af475)
2022-05-14 13:44:11 +00:00
8b63e3dc6d Merge pull request #18569 from neovim/backport-18180-to-release-0.7
[Backport release-0.7] vim-patch:8.2.{0358,4792,4794}: indent operator creates an undo entry for every line
2022-05-14 21:15:40 +08:00
7d4ab102a6 vim-patch:8.2.4794: compiler warning for not initialized variable
Problem:    Compiler warning for not initialized variable.
Solution:   Initialize the variable. (John Marriott)
4c84dd33ad
(cherry picked from commit f9c8ba0b85)
2022-05-14 12:50:35 +00:00
31307c3877 vim-patch:8.2.4792: indent operator creates an undo entry for every line
Problem:    Indent operator creates an undo entry for every line.
Solution:   Create one undo entry for all lines. (closes vim/vim#10227)
e468698994
(cherry picked from commit f8b832b171)
2022-05-14 12:50:35 +00:00
4e4e185405 vim-patch:8.2.0358: insufficient testing for indent.c
Problem:    Insufficient testing for indent.c.
Solution:   Add indent tests. (Yegappan Lakshmanan, closes vim/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)
2022-05-14 12:50:35 +00:00
aba7cb0613 Merge pull request #18552 from neovim/backport-18545-to-release-0.7
[Backport release-0.7] vim-patch:8.2.4943: changing 'switchbuf' may have no effect
2022-05-13 08:39:37 +08:00
56d05076f8 vim-patch:8.2.4943: changing 'switchbuf' may have no effect
Problem:    Changing 'switchbuf' may have no effect.
Solution:   Handle 'switchbuf' in didset_string_options(). (Sean Dewar,
            closes vim/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)
2022-05-12 23:41:54 +00:00
496e786cad Merge pull request #18534 from neovim/backport-18480-to-release-0.7
[Backport release-0.7] fix(runtime/genvimvim): omit s[ubstitute] from vimCommand
2022-05-12 10:09:48 +08:00
0377973769 fix(runtime/genvimvim): omit s[ubstitute] from vimCommand
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)
2022-05-12 00:09:01 +00:00
35075dcc22 [Backport release-0.7] fix(lsp): fix unnecessary buffers being added on empty diagnostics (#18469)
* 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>
2022-05-08 11:27:30 +02:00
9e040acfa3 fix(lsp): unify progress message handling (#18468)
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>
2022-05-08 11:27:22 +02:00
28c08fdbe3 Merge pull request #18473 from neovim/backport-18472-to-release-0.7
[Backport release-0.7] vim-patch:8.2.4908: no text formatting for // comment after a statement
2022-05-08 08:17:36 +08:00
37b82b513c vim-patch:8.2.4908: no text formatting for // comment after a statement
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)
2022-05-07 23:51:48 +00:00
8a23b8ed29 vim-patch:8.2.4907: some users do not want a line comment always inserted (#18464)
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>
2022-05-07 17:39:28 +02:00
7990fa4a17 Merge pull request #18446 from neovim/backport-18445-to-release-0.7
[Backport release-0.7] vim-patch:8.2.4881: "P" in Visual mode still changes some registers
2022-05-06 19:55:21 +08:00
ca3ef915ce vim-patch:8.2.4881: "P" in Visual mode still changes some registers
Problem:    "P" in Visual mode still changes some registers.
Solution:   Make "P" in Visual mode not change any register. (Shougo
            Matsushita, closes vim/vim#10349)
509142ab7a
(cherry picked from commit 28c74ef687)
2022-05-06 11:27:01 +00:00
0b8faccade feat(api): add group_name to nvim_get_autocmds (#18440)
(cherry picked from commit 96289f2416)

Co-authored-by: Famiu Haque <famiuhaque@protonmail.com>
2022-05-05 21:00:33 +02:00
b7a5278249 feat(api): add group_name to nvim_get_autocmds (#18440)
(cherry picked from commit 96289f2416)

Co-authored-by: Famiu Haque <famiuhaque@protonmail.com>
2022-05-05 20:59:45 +02:00
e28799f2d8 fix: display global statusline correctly with ext_messages (#18436)
(cherry picked from commit b5957c3c32)

Co-authored-by: shirasaka <shirasaka@n-create.co.jp>
2022-05-05 19:00:35 +02:00
c4690565c7 Merge pull request #18422 from neovim/backport-18420-to-release-0.7
[Backport release-0.7] vim-patch:8.2.4868: when closing help window autocmds triggered for wrong window
2022-05-05 08:29:47 +08:00
15b8036f90 vim-patch:8.2.4868: when closing help window autocmds triggered for wrong window
Problem:    When closing help window autocmds triggered for the wrong window.
Solution:   Figure out the new current window earlier. (closes vim/vim#10348)
2a2707d033
(cherry picked from commit 71580dfef4)
2022-05-04 23:27:22 +00:00
7f08e3282f Merge pull request #18421 from neovim/backport-18418-to-release-0.7
[Backport release-0.7] vim-patch:8.2.4865: :startinsert right after :stopinsert may not work
2022-05-05 07:21:55 +08:00
3b4881afc2 vim-patch:8.2.4865: :startinsert right after :stopinsert may not work
Problem:    :startinsert right after :stopinsert does not work when popup menu
            is still visible.
Solution:   Use ins_compl_active() instead of pum_visible(). (closes vim/vim#10352)
cd5dbad184
(cherry picked from commit 97d86c45af)
2022-05-04 22:58:56 +00:00
1e28068d0d fix: ensure has() does not change v:shell_error (#18415)
(cherry picked from commit 0f21816b5f)

Co-authored-by: Andrey Mishchenko <mishchea@gmail.com>
2022-05-04 08:17:59 -07:00
203b088d75 [Backport release-0.7] build(deps): bump LuaJIT to HEAD - 91bc6b8ad (#18411)
* build(deps): bump LuaJIT to HEAD - 91bc6b8ad

(cherry picked from commit a0c10f6b67)

Co-authored-by: Christian Clason <c.clason@uni-graz.at>
2022-05-04 10:21:42 +02:00
f179729789 refactor(lua): replace hard-coded gsub with vim.pesc() (#18410)
(cherry picked from commit b4c7f763f9)

Co-authored-by: James McCoy <jamessan@jamessan.com>
2022-05-04 08:57:41 +02:00
e502e8106a fix(treesitter): bump match limit up (#18400)
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>
2022-05-03 22:58:02 +02:00
7567d2195a Merge pull request #18390 from neovim/backport-18382-to-release-0.7
[Backport release-0.7] fix(lsp): add missing bufnr argument to util.apply_text_edits
2022-05-03 22:33:01 +08:00
a10a904b8f Merge pull request #18391 from neovim/backport-18384-to-release-0.7
[Backport release-0.7] ci(MinGW): run pacman -Syu twice
2022-05-03 22:31:00 +08:00
3868c8db6f ci(MinGW): run pacman -Syu twice
(cherry picked from commit d4994a4e0f)
2022-05-03 14:29:41 +00:00