Commit Graph

21250 Commits

Author SHA1 Message Date
dundargoc
843d9223a1
build(clang-format): align with project style #18192 2022-04-23 20:48:38 -07:00
dundargoc
92f7286377
docs: make docstring consistent with parameters #18178
Closes: https://github.com/neovim/neovim/issues/12691
2022-04-23 17:01:01 -07:00
zeertzjq
cfaf7440fc
ci(backport): remove triggering by comment (#18210)
Triggering by comment is not needed. Applying the label is enough to
trigger the backport action.
2022-04-23 14:26:42 -07:00
Gregory Anders
d3df415228
Merge pull request #18197 from dundargoc/build/clint/python3
build/clint/python3
2022-04-23 14:06:50 -06:00
Christian Clason
5c53e29ca9
fix(ftdetect): source plugins in autogroup (#18237)
In `filetype.lua`, source runtime `ftdetect` scripts within the `filetypedetect` augroup, same as `filetype.vim` (and only do so if `g:did_load_ftdetect` does not exist).
2022-04-23 17:57:38 +02:00
zeertzjq
a98cf154ed
Merge pull request #18226 from zeertzjq/vim-8.2.4805
vim-patch:8.2.{4805,4812}: CurSearch used for all matches in current line
2022-04-23 19:51:32 +08:00
zeertzjq
79ab277011 vim-patch:8.2.4812: unused struct item
Problem:    Unused struct item.
Solution:   Remove "lines" match_T.  Simplify the code. (closes vim/vim#10256)
8279cfe499
2022-04-23 19:25:51 +08:00
zeertzjq
8db55aedb5 vim-patch:8.2.4805: CurSearch used for all matches in current line
Problem:    CurSearch used for all matches in current line.
Solution:   Don't use the non-zero line count. (closes vim/vim#10247)
9b36750640
2022-04-23 19:24:47 +08:00
Andrey Mishchenko
4e4914ab2e
fix(lua): don't mutate opts parameter of vim.keymap.del (#18227)
`vim.keymap.del` takes an `opts` parameter that lets caller refer to and
delete buffer-local mappings. For some reason the implementation of
`vim.keymap.del` mutates the table that is passed in, setting
`opts.buffer` to `nil`. This is wrong and also undocumented.
2022-04-23 08:01:08 +08:00
Chinmay Dalal
116a3f4683
fix(treesitter): create new parser if language is not the same as cached parser (#18149) 2022-04-22 16:15:28 +02:00
bfredl
f4f593b333
Merge pull request #18211 from clason/update-inspect
chore: update inspect.lua to 3.1.3
2022-04-22 10:53:00 +02:00
Christian Clason
6c8a3013ac
docs(lua): explain and link to lua patterns (#18206)
also correct explanation of when it's allowed to omit parens in Lua function calls
2022-04-21 21:46:07 +02:00
Christian Clason
64784dccb5 chore: update inspect.lua to 3.1.3 2022-04-21 16:23:10 +02:00
dundargoc
28fb40b16f
refactor(normal): fix most clint warnings (#18196) 2022-04-21 14:06:23 +01:00
zeertzjq
af5a7a0582
Merge pull request #18209 from zeertzjq/vim-8.2.4759
vim-patch:8.2.4759: CurSearch highlight does not work for multi-line match
2022-04-21 20:44:15 +08:00
zeertzjq
4b19f94c28 vim-patch:8.2.4759: CurSearch highlight does not work for multi-line match
Problem:    CurSearch highlight does not work for multi-line match.
Solution:   Check cursor position before adjusting columns. (closes vim/vim#10133)
693ccd1160
2022-04-21 20:19:58 +08:00
zeertzjq
e6dec30332
Merge pull request #18182 from zeertzjq/vim-8.2.2472
vim-patch:8.1.1756,8.2.{2472,2474,2475,2476,2477,4791,4802}: autocommand fixes
2022-04-21 19:43:09 +08:00
zeertzjq
5e9afca1c1 vim-patch:8.2.4802: test is not cleaned up
Problem:    Test is not cleaned up.
Solution:   Make test clean up after itself.  Avoid NUL. (closes vim/vim#10233)
7851c69a12

Adapt test_autocmd_vimgrep() to Nvim.
2022-04-21 19:07:50 +08:00
Charlie Groves
e69cb86750 test: add a Lua functional test for NoName buffer event order 2022-04-21 19:07:50 +08:00
zeertzjq
f531fb97ff vim-patch:8.2.4791: events triggered in different order when reusing buffer
Problem:    Autocmd events triggered in different order when reusing an empty
            buffer.
Solution:   Call buff_freeall() earlier. (Charlie Groves, closes vim/vim#10198)
fef4485ef5

Test failure becomes very strange.
2022-04-21 19:07:50 +08:00
zeertzjq
69fc23ed98 vim-patch:8.2.2477: autocommand tests hang on MS-Windows
Problem:    Autocommand tests hang on MS-Windows.
Solution:   Skip a couple of tests.  Fix file name.
dd07c02232
2022-04-21 19:07:50 +08:00
zeertzjq
1664e3d4bc vim-patch:8.2.2476: using freed memory when splitting window while closing buffer
Problem:    Using freed memory when using an autocommand to split a window
            while a buffer is being closed.
Solution:   Disallow splitting when the buffer has b_locked_split set.
983d83ff1c

Put the error message in window.c.
Cherry-pick a memory leak fix from Vim patch 8.2.0399.
Test still fails.
2022-04-21 19:07:50 +08:00
zeertzjq
407be5975d vim-patch:8.2.2475: autocommand tests hangs on MS-Windows
Problem:    Autocommand tests hangs on MS-Windows.
Solution:   Skip one test.
dfc3db76b9
2022-04-21 19:07:50 +08:00
zeertzjq
69ac382a28 vim-patch:8.2.2474: using freed memory when window is closed by autocommand
Problem:    Using freed memory when window is closed by autocommand.
            (houyunsong)
Solution:   Check the window pointer is still valid.
2c7080bf1c

Add missing comment from Vim patch 8.0.1420.
Test fails.
2022-04-21 19:07:50 +08:00
zeertzjq
fa15f2f938 vim-patch:8.2.2472: crash when using command line window in an autocommand
Problem:    Crash when using command line window in an autocommand.
            (houyunsong)
Solution:   Save and restore au_new_curbuf.
aad5f9d79a

Nvim has removed :open, so use :edit in the test instead.
2022-04-21 19:07:50 +08:00
zeertzjq
9b10b4cc64 vim-patch:8.1.1756: autocommand that splits window messes up window layout
Problem:    Autocommand that splits window messes up window layout.
Solution:   Disallow splitting a window while closing one.  In ":all" give an
            error when moving a window will not work.
1417c766f5

Expected error number was changed to E242 in Vim in patch 8.2.1183, and
patch 8.2.2420 (which has already been ported) made the test no longer
throw E249 in Vim, so just use E242 in the test.
2022-04-21 19:06:50 +08:00
zeertzjq
5c4ec25478
Merge pull request #18200 from atusy/doc-vim-keymap-set
docs: vim.keymap.set can specify buffer as an option
2022-04-21 17:31:40 +08:00
atusy
5ecbbba6ee docs: vim.keymap.set can specify buffer as an option 2022-04-21 10:45:39 +09:00
zeertzjq
db851cb105
Merge pull request #18199 from zeertzjq/vim-8.2.4797
vim-patch:8.2.4797: getwininfo() may get oudated values
2022-04-21 08:06:18 +08:00
zeertzjq
a4b75010ba
Merge pull request #18180 from zeertzjq/vim-8.2.4792
vim-patch:8.2.{0358,4792,4794}: indent operator creates an undo entry for every line
2022-04-21 07:50:02 +08:00
zeertzjq
f9c8ba0b85 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
2022-04-21 07:24:50 +08:00
zeertzjq
f8b832b171 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
2022-04-21 07:24:50 +08:00
zeertzjq
c72857d396 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.
2022-04-21 07:24:47 +08:00
zeertzjq
87e1693ba6 vim-patch:8.2.4797: getwininfo() may get oudated values
Problem:    getwininfo() may get oudated values.
Solution:   Make sure w_botline is up-to-date. (closes vim/vim#10226)
8530b41fd3

Correct test order and add a modeline in test_bufwintabinfo.vim.
2022-04-21 07:09:42 +08:00
zeertzjq
c6dcc6acd8
Merge pull request #18189 from zeertzjq/vim-8.2.4795
vim-patch:8.2.{4795,4796,4801}: 'cursorbind' scrolling depends on whether 'cursorline' is set
2022-04-21 06:57:13 +08:00
zeertzjq
61eca90f65
Merge pull request #18187 from zeertzjq/vim-8.2.4724
vim-patch:8.2.4724: current instance of last search pattern not easily spotted
2022-04-21 06:55:28 +08:00
zeertzjq
8145357974 vim-patch:8.2.4724: current instance of last search pattern not easily spotted
Problem:    Current instance of last search pattern not easily spotted.
Solution:   Add CurSearch highlighting. (closes vim/vim#10133)
a43993897a

This fixes CurSearch highlight for multiline match.
Omit screen redrawing code because Nvim redraws CurSearch differently.
2022-04-21 06:24:11 +08:00
zeertzjq
94f12e8a59 vim-patch:8.2.4801: fix for cursorbind fix not fully tested
Problem:    Fix for cursorbind fix not fully tested.
Solution:   Add another test case. (Christian Brabandt, closes vim/vim#10240)
3fd7480cd2
2022-04-21 06:10:42 +08:00
zeertzjq
4c5a2e8ebf vim-patch:8.2.4796: file left behind after running cursorline tests
Problem:    File left behind after running cursorline tests.
Solution:   Uncomment the line that deletes the file.
da1050cd6f
2022-04-21 06:10:42 +08:00
zeertzjq
5600766b41 vim-patch:8.2.4795: 'cursorbind' scrolling depends on whether 'cursorline' is set
Problem:    'cursorbind' scrolling depends on whether 'cursorline' is set.
Solution:   Always call validate_cursor(). (Christian Brabandt, closes vim/vim#10230,
            closes vim/vim#10014)
2c645e8b00
2022-04-21 06:10:42 +08:00
Dundar Goc
92844b4499 build(clint): remove all python2-isms with pyupgrade
The script is functionally the same, just with some nicer syntactic
sugar thanks to only supporting python3.
2022-04-20 23:15:26 +02:00
Dundar Goc
df48b355d2 build(clint): change shebang to python3
There are distributions that doesn't symlink python to python3.
This will make clint work for these without any additional steps from
the user.
2022-04-20 23:01:15 +02:00
Christian Clason
bfd6eb4404
Merge pull request #18185 from clason/vim-8.2.4781
vim-patch:8.2.{4781,4793}: maxima files are not recognized
2022-04-20 21:45:22 +02:00
Christian Clason
85b13f6db4
docs(filetype): proper example for did_load_filetypes (#18191) 2022-04-20 21:41:35 +02:00
Mathias Fußenegger
a48a0a4f7b
docs(api): add example showing necessity to wrap callback function (#18179)
Some people ran into issues trying to use `callback = myluafun` because
of the event data payload.


Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
2022-04-20 18:42:07 +02:00
runiq
7e7fdca163
fix(lsp): unify progress message handling (#18040)
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).
2022-04-20 18:40:52 +02:00
Gregory Anders
6b0d3ae6a8
fix(diagnostic): use nvim_exec_autocmds to trigger DiagnosticChanged (#18188)
Use nvim_exec_autocmds to issue the DiagnosticChanged autocommand,
rather than nvim_buf_call, which has some side effects when drawing
statuslines.
2022-04-20 08:16:47 -06:00
bfredl
81f1e33d15
Merge pull request #18145 from bfredl/term_opt
feat(api): allow remote UI to set terminal options
2022-04-20 14:50:04 +02:00
Christian Clason
63eb7e865b vim-patch:8.2.4793: recognizing Maxima filetype even though it might be another
Problem:    Recognizing Maxima filetype even though it might be another.
Solution:   Remove *.mc and *.dem patterns from Maxima files
928a131356
2022-04-20 09:52:31 +02:00
Christian Clason
d40b2afda8 vim-patch:8.2.4781: Maxima files are not recognized
Problem:    Maxima files are not recognized.
Solution:   Add patterns to detect Maxima files. (Doron Behar, closes vim/vim#10211)
d0a20c9d11
2022-04-20 09:50:19 +02:00