Commit Graph

22308 Commits

Author SHA1 Message Date
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
zeertzjq
540d1af90e
Merge pull request #19330 from zeertzjq/vim-8.2.0203
vim-patch:8.2.0203: :helptags and some other functionality not tested
2022-07-12 12:18:10 +08:00
zeertzjq
53392f48b1 vim-patch:8.2.0203: :helptags and some other functionality not tested
Problem:    :helptags and some other functionality not tested.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#5567)
e20b9ececa
2022-07-12 11:52:47 +08:00
zeertzjq
189db2b759 fix(cmdline): fix passing -1 as char 2022-07-12 11:49:32 +08:00
Nicolas Hillegeer
034d28c705
fix(lsp): don't attach a client in lsp.start() if there is none (#19328)
vim.lsp.start_client() may fail (for example if the `cmd` is not
executable). It produces a nice error notification in this case. Passing
the `nil` value returned from an erroneous `vim.lsp.start_client()` call
into `vim.lsp.buf_attach_client()` causes a meaty param validate
exception message. Avoid this.
2022-07-11 19:37:01 -06:00
zeertzjq
195d8496a0
Merge pull request #19277 from zeertzjq/vim-8.1.1855
vim-patch:8.1.{1855,1859,1864,1867}: flaky timer tests
2022-07-12 07:21:04 +08:00
zeertzjq
cea96ca39d test(old): test_timers.vim call timer_stopall() in SetUp() instead 2022-07-12 06:58:13 +08:00
zeertzjq
d8f6426714 vim-patch:8.1.1867: still a timer test that is flaky on Mac
Problem:    Still a timer test that is flaky on Mac.
Solution:   Loop with a sleep instead of one fixed sleep.
315244d85b
2022-07-12 06:45:19 +08:00
zeertzjq
5119d10d41 vim-patch:8.1.1864: still a timer test that is flaky on Mac
Problem:    Still a timer test that is flaky on Mac.
Solution:   Adjust the sleep times.
413c04e8d5
2022-07-12 06:45:19 +08:00
zeertzjq
061e573e7e vim-patch:8.1.1859: timer test sometimes fails on Mac
Problem:    Timer test sometimes fails on Mac.
Solution:   Show more info when it fails.
427dddf014
2022-07-12 06:45:19 +08:00
zeertzjq
9bea841925 vim-patch:8.1.1855: another failing timer test
Problem:    Another failing timer test.
Solution:   Assert that timers are finished by the end of the test.  Rename
            test functions to make them easier to find.
9a2fddcf04

Use test_garbagecollect_now() in Test_timer_retain_partial() like Vim.
2022-07-12 06:45:19 +08:00
zeertzjq
daa49b525e
Merge pull request #19320 from zeertzjq/vim-8.2.0212
vim-patch:8.2.{0212,0243,0250}: insufficient tests
2022-07-12 06:24:29 +08:00
zeertzjq
27fd17a79c vim-patch:8.2.0243: insufficient code coverage for ex_docmd.c functions
Problem:    Insufficient code coverage for ex_docmd.c functions.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#5618)
9f6277bdde

Cherry-pick Test_window_only() from patch 8.2.0203.
Cherry-pick a memory leak fix from patch 8.2.0399.
2022-07-12 05:36:33 +08:00
zeertzjq
eea6a4f2a0 vim-patch:8.2.{0212,0250}
vim-patch:8.2.0212: missing search/substitute pattern hardly tested

Problem:    Missing search/substitute pattern hardly tested.
Solution:   Add test_clear_search_pat() and tests. (Yegappan Lakshmanan,
            closes vim/vim#5579)
07ada5ff2f

vim-patch:8.2.0250: test_clear_search_pat() is unused

Problem:    test_clear_search_pat() is unused.
Solution:   Remove the function. (Yegappan Lakshmanan, closes vim/vim#5624)
4f5776c17c
2022-07-12 05:36:33 +08:00
zeertzjq
e71cc4a8dc test(old): align defaults to Vim before each test instead 2022-07-12 05:36:33 +08:00
Dundar Goc
d77ec8a5c6 ci: remove unnecessary file ci/script.sh
It only runs run_tests.sh and checks coverage, which can be replaced by
just moving the coverage check to ci/run_tests.sh.
2022-07-11 17:16:55 +02:00
Dundar Goc
bb1a464467 ci: remove unnecessary file run_lint.sh
It's a leftover artifact that currently just acts as an unnecessary
intermediary script that calls the Makefile. It can be replaced by just
calling the Makefile directly.
2022-07-11 16:41:06 +02:00
zeertzjq
5c3bbb67e7
vim-patch:8.2.3363: when :edit reuses the current buffer the alternate file is set (#19306)
Problem:    When :edit reuses the current buffer the alternate file is set to
            the same buffer.
Solution:   Only set the alternate file when not reusing the buffer.
            (closes vim/vim#8783)
b8bd2e6eba

Cherry-pick Test_cmdline_expand_special() from patches 8.2.{0243,2873}.
Move Test_cmd_backtick() to the right place.
2022-07-11 20:55:26 +08:00
Rishikesh Vaishnav
ac10c0f418
fix(lsp): abort pending changes after flush when debouncing (#19314)
Issuing a server request triggers `changetracking.flush` so as to
make sure we're not operating on a stale state. This immediately
triggers notification of any pending changes (as a result of debouncing)
to the server. However, this happens in addition to the notification
that is waiting on the debounce delay. Because we `nil`
`buf_state.pending_change` when it is called, the fix is to
also check that this is non-`nil` when it is called and exit if it is,
as this being `nil` would mean that it originates from a pending change
that has already been flushed out.
2022-07-11 12:48:02 +02:00
Mathias Fußenegger
95c65a6b22
feat(lsp): defaults: tagfunc, omnifunc (#19003)
set `tagfunc` to `vim.lsp.tagfunc` and `omnifunc` to `vim.lsp.omnifunc` if empty when attaching a server
2022-07-10 17:26:43 +02:00
zeertzjq
67b26a39f0
Merge pull request #19305 from zeertzjq/vim-8.2.3530
vim-patch:8.2.{3530,3531}: ":buf \{a}" fails while ":edit \{a}" works
2022-07-10 20:20:06 +08:00