Commit Graph

22278 Commits

Author SHA1 Message Date
ii14
f59c96903a refactor: use local api = vim.api 2022-07-15 18:26:47 +02:00
Famiu Haque
6645f59832
fix: right-click in clickable statusline #19252
Problem:
1. Right-click does not work in statusline unless you left-click first (to focus
   the statusline).
2. Modifier (e.g. shift+rightclick) does not work in statusline.

Solution:
Make clickable statusline sections receive right-clicks regardless of whether
the statusline is focused.

Closes #18994
2022-07-15 09:15:02 -07:00
ii14
8bccefcb87 refactor: use npcall from vim.F 2022-07-15 17:55:00 +02:00
Justin M. Keyes
5c49129c5e
Merge #19324 ci: cleanup ci/ files 2022-07-15 17:42:00 +02:00
ii14
8a5c7e91f2 refactor(lsp): make the use of local aliases more consistent 2022-07-15 17:39:26 +02:00
Justin M. Keyes
9370e1c511
feat(lsp): hide backticks in LSP docstrings #19377
Also clear `markdownError`: don't want to highlight invalid markdown
syntax in LSP docstrings.

fix #16114
2022-07-15 08:13:16 -07:00
Gregory Anders
1c9f487f0e
feat(defaults): nnoremap & :&&<CR> #19365 2022-07-15 06:23:29 -07:00
zeertzjq
c0ae3df052
Merge pull request #19376 from zeertzjq/vim-8.2.0535
vim-patch:8.2.{0535,0542}: regexp patterns not fully tested
2022-07-15 20:45:52 +08:00
zeertzjq
8bfcff6c4a vim-patch:8.2.0542: no test for E386
Problem:    No test for E386.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#5911)
8832a34578

Cherry-pick Test_search_errors() from patch 8.2.0448.
2022-07-15 20:23:48 +08:00
zeertzjq
ba5ff6e5f0 vim-patch:8.2.0535: regexp patterns not fully tested
Problem:    Regexp patterns not fully tested.
Solution:   Add more regexp tests and others. (Yegappan Lakshmanan,
            closes vim/vim#5901)
4d23c52824

Add missing Test_search_cmdline8().
Cherry-pick Test_invalid_regexp() from patch 8.2.0531.
2022-07-15 20:23:48 +08:00
zeertzjq
827906136d test: improve searchhl tests 2022-07-15 19:38:13 +08:00
zeertzjq
b9f15caf5c
Merge pull request #19375 from zeertzjq/vim-8.2.0403
vim-patch:8.1.1547,8.2.0403: when 'buftype' is "nofile" there is no overwrite check
2022-07-15 19:26:32 +08:00
zeertzjq
0cf5cd1ac9 vim-patch:8.2.0403: when 'buftype' is "nofile" there is no overwrite check
Problem:    When 'buftype' is "nofile" there is no overwrite check.
Solution:   Also check for existing file when 'buftype' is set.
            (closes vim/vim#5807)
a3a9c8ef69

Nvim doesn't have buftype=popup and doesn't allow buftype=terminal for
non-terminal buffer.
2022-07-15 18:27:21 +08:00
zeertzjq
4a64cdafd6 vim-patch:8.1.1547: functionality of bt_nofile() is confusing
Problem:    Functionality of bt_nofile() is confusing.
Solution:   Split into bt_nofile() and bt_nofilename().
26910de8b0
2022-07-15 18:27:21 +08:00
zeertzjq
564d99c89a
Merge pull request #19373 from zeertzjq/vim-8.2.0426
vim-patch:8.0.1118,8.2.0426
2022-07-15 16:49:00 +08:00
zeertzjq
a649af4dba vim-patch:8.2.0426: some errors were not tested for
Problem:    Some errors were not tested for.
Solution:   Add tests. (Dominique Pelle, closes vim/vim#5824)
9b9be007e7

Cherry-pick get_highest_fnum() from patch 8.1.1908 to make tests pass.
2022-07-15 15:21:39 +08:00
zeertzjq
7b5b7b3cc6 vim-patch:8.0.1118: FEAT_WINDOWS adds a lot of #ifdefs
Problem:    FEAT_WINDOWS adds a lot of #ifdefs while it is nearly always
            enabled and only adds 7% to the binary size of the tiny build.
Solution:   Graduate FEAT_WINDOWS.
4033c55eca
2022-07-15 15:21:39 +08:00
zeertzjq
9777907467
Merge pull request #19369 from zeertzjq/vim-8.2.0482
vim-patch:8.2.{0430,0482}: insufficient tests
2022-07-15 11:14:22 +08:00
zeertzjq
465b73c3a5 vim-patch:8.2.0482: channel and sandbox code not sufficiently tested
Problem:    Channel and sandbox code not sufficiently tested.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#5855)
ca68ae1311

Cherry-pick test_clientserver.vim changes form patch 8.2.0448.
2022-07-15 10:50:21 +08:00
zeertzjq
c821b5c695 vim-patch:8.2.0430: window creation failure not properly tested
Problem:    Window creation failure not properly tested.
Solution:   Improve the test. (Yegappan Lakshmanan, closes vim/vim#5826)
5080b0a047
2022-07-15 10:50:21 +08:00
zeertzjq
73f96ce4c6
Merge pull request #19348 from akinsho/bugfix/winbar-winhighlight
fix(winbar): make setting WinBar and WinBarNC in 'winhighlight' work
2022-07-15 09:56:17 +08:00
zeertzjq
8730643326 fix(winbar): make setting WinBar and WinBarNC in 'winhighlight' work 2022-07-15 09:22:57 +08:00
zeertzjq
072fb55cb0
vim-patch:9.0.0052: "zG" may throw an error if invalid character follows (#19368)
Problem:    "zG" may throw an error if invalid character follows.
Solution:   Pass the word length to valid_spell_word(). (Ken Takata,
            closes vim/vim#10737)
2ebcc35826
2022-07-15 08:42:36 +08:00
Luis Felipe Dominguez Vega
75ad050919
fix(build): fails if git is missing #19366
Generate empty file if git is missing.
2022-07-14 15:25:28 -07:00
zeertzjq
001f19de28
Merge pull request #19364 from zeertzjq/vim-8.2.0921
vim-patch:8.2.{0921,0926}: CTRL-W T in cmdline window causes trouble
2022-07-14 20:59:17 +08:00
zeertzjq
8d67358d49 vim-patch:8.2.0926: cmdline test fails on Appveyor
Problem:    Cmdline test fails on Appveyor.
Solution:   Add CR to the commands. (Naruhiko Nishino, closes vim/vim#6220)
951a2fb1b8
2022-07-14 20:36:34 +08:00
zeertzjq
08235b6f2a vim-patch:8.2.0921: CTRL-W T in cmdline window causes trouble
Problem:    CTRL-W T in cmdline window causes trouble.
Solution:   Disallow CTRL-W T in the cmdline window.  Add more tests.
            (Naruhiko Nishino, closes vim/vim#6219)
4fdb8bd054

Test already passes in Nvim because of later patches.
Move Test_cmdwin_jump_to_win() to the right place.
2022-07-14 20:34:05 +08:00
Christian Clason
b41f2bcae7
build(deps): bump LuaJIT to HEAD - 50936d784 (#19343) 2022-07-14 12:30:46 +02:00
Stephan Seitz
ddaef0618d
fix(treesitter): don't error when node argument of predicate is nil (#19355)
When the node mentioned in a predicate is not required for the query
then predicates putting restrictions on that node shouldn't run.

Fixes https://github.com/nvim-treesitter/nvim-treesitter/issues/2600
2022-07-14 12:18:03 +02:00
zeertzjq
c6f0be116e
Merge pull request #19353 from zeertzjq/vim-8.2.0369
vim-patch:8.2.{0342,0347,0369}: insufficient test coverage
2022-07-14 18:15:31 +08:00
zeertzjq
314f1a7c21 vim-patch:8.2.0369: various Normal mode commands not fully tested
Problem:    Various Normal mode commands not fully tested.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#5751)
1671f44881

Cherry-pick a fix from patch 8.2.3162.
Omit test_iminsert.vim as previous patches to that file are N/A, and
Nvim doesn't support iminsert=2 either, so that test isn't useful.
2022-07-14 15:40:07 +08:00
zeertzjq
bf96b9f11d vim-patch:8.2.0347: various code not covered by tests
Problem:    Various code not covered by tests.
Solution:   Add more test coverage. (Yegappan Lakshmanan, closes vim/vim#5720)
91ffc8a5f5

Test_Ex_echo_backslash() is not applicable to Vim enhanced Ex mode.
2022-07-14 15:40:07 +08:00
zeertzjq
c467df997e vim-patch:8.2.0342: some code in ex_getln.c not covered by tests
Problem:    Some code in ex_getln.c not covered by tests.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#5717)
0546d7df13

Nvim doesn't support imsearch=2, commenting out that line is enough.
Test_Ex_append() is not applicable to Vim enhanced Ex mode.
Omit test_iminsert.vim as previous patches to that file are N/A.
2022-07-14 15:40:07 +08:00
Christian Clason
b81d1eb265
build(deps): bump tree-sitter to HEAD - 1f1b1eb45 (#19347) 2022-07-14 09:21:02 +02:00
Christian Clason
685d6ab6ca
build(deps): bump Luv to 1.44.2-0 (#19346) 2022-07-14 09:20:47 +02:00
kylo252
912dbbdd77
build: gracefully handle error in git-version #19289
- only update git-version if both of these conditions are met:
    - `git` command succeeds
    - `versiondef_git.h` would change (SHA1-diff)
- else print a status/warning message

also move version generation out of Lua into cmake.
2022-07-14 00:12:27 -07:00
zeertzjq
b93cb481a2
feat(eval)!: input() support any type for "cancelreturn" in a dict (#19357) 2022-07-14 14:47:25 +08:00
zeertzjq
778541067a
vim-patch:8.2.0969: assert_equal() output for dicts is hard to figure out (#19317)
Problem:    Assert_equal() output for dicts is hard to figure out.
Solution:   Only show the different items.
4a021dfbee
2022-07-13 09:38:15 +08:00
zeertzjq
c01690b1ea
fix(exmode): flush messages before printing a line after pressing Enter (#19341) 2022-07-13 09:06:31 +08:00
zeertzjq
39d51c833a
vim-patch:8.2.0035: saving and restoring called_emsg is clumsy (#19335)
Problem:    Saving and restoring called_emsg is clumsy.
Solution:   Count the number of error messages.
53989554a4
2022-07-13 04:08:49 +08:00
Christian Clason
b1e0197a14
build(deps): bump libuv to v1.44.2 (#19338) 2022-07-12 20:45:24 +02:00
zeertzjq
d8360e9033
Merge pull request #19334 from zeertzjq/vim-8.2.0275
vim-patch:8.2.{0275,0293,5050}
2022-07-12 17:02:46 +08:00
zeertzjq
aa373e3abb vim-patch:8.2.5050: using freed memory when searching for pattern in path
Problem:    Using freed memory when searching for pattern in path.
Solution:   Make a copy of the line.
409510c588

Cherry-pick Test_def_search() -> Test_macro_search() from patch 8.2.0369
2022-07-12 16:23:32 +08:00
zeertzjq
4aa4675fbf vim-patch:8.2.0293: various Ex commands not sufficiently tested
Problem:    Various Ex commands not sufficiently tested.
Solution:   Add more test cases. (Yegappan Lakshmanan, closes vim/vim#5673)
818fc9ad14

Needs to assert E170 instead of E580 because patch 8.2.3486 has been
ported but patch 8.2.1183 hasn't.
2022-07-12 16:23:32 +08:00
zeertzjq
01afd43bc9 vim-patch:8.2.0275: some Ex code not covered by tests
Problem:    Some Ex code not covered by tests.
Solution:   Add test cases. (Yegappan Lakshmanan, closes vim/vim#5659)
406cd90f19
2022-07-12 16:23:32 +08:00
Nicolas Hillegeer
0f1b17788e
fix(lsp): account for initializing servers in vim.lsp.start (#19329)
Fixes #19326
2022-07-12 09:44:11 +02:00
zeertzjq
8b75ca7345
Merge pull request #19332 from zeertzjq/vim-8.2.0270
vim-patch:8.2.{0270,2732}
2022-07-12 14:36:05 +08:00
zeertzjq
1abdb3224b vim-patch:8.2.2732: prompt for s///c in Ex mode can be wrong
Problem:    Prompt for s///c in Ex mode can be wrong.
Solution:   Position the cursor before showing the prompt. (closes vim/vim#8073)
e5b0b98a90
2022-07-12 14:08:34 +08:00
zeertzjq
d079995fb8 vim-patch:8.2.0270: some code not covered by tests
Problem:    Some code not covered by tests.
Solution:   Add test cases. (Yegappan Lakshmanan, closes vim/vim#5649)
bc2b71d44a
2022-07-12 14:08:34 +08:00
zeertzjq
6a670a00b3 fix(exmode): do not throttle messages when pressing enter to print line 2022-07-12 14:06:42 +08:00