Commit Graph

20536 Commits

Author SHA1 Message Date
Dundar Göc
864e51a1dd test: correct emmylua annotations
This will fix the warnings sumneko language server outputs.
2022-02-20 21:14:27 +01:00
Michael Lingelbach
6a3acccd8b
fix(lsp): use botright copen for all handlers (#17471) 2022-02-20 11:09:01 -08:00
James McCoy
4b3fb4b177
Merge pull request #17469 from jamessan/use-sysdeps-for-lint-ci
Use system dependencies for lint CI
2022-02-20 07:35:35 -05:00
James McCoy
13b13dcaa0
Merge pull request #17470 from dundargoc/ci/remove-success
ci: remove success check since it's the default
2022-02-20 07:34:50 -05:00
Dundar Göc
4ea8201356 ci: remove success check since it's the default 2022-02-20 13:17:55 +01:00
James McCoy
2446b25c6b
ci: only cache third-party deps if they exist 2022-02-19 20:36:29 -05:00
James McCoy
0adbe58bb2
ci: ensure ~/.cache exists 2022-02-19 20:36:29 -05:00
James McCoy
0c4c384ed1
ci(lint): explicity build nvim
“make clint-full” bypasses the normal mechanisms used to communicate
build flags in the CI jobs, so explicitly build nvim before running the
lint jobs.
2022-02-19 20:35:05 -05:00
James McCoy
34cb26011e
ci(lint): build against system deps 2022-02-19 20:35:04 -05:00
James McCoy
8cd4c11494
ci(lint): install deps via apt instead of building from third-party 2022-02-19 20:35:04 -05:00
Sean Dewar
8b3799e2c3
Merge pull request #17460 from seandewar/vim-8.2.4419
vim-patch:8.2.{4403,4418,4419,4422}
2022-02-19 22:59:15 +00:00
Christian Clason
439a843b80
vim-patch:8.2.4424: ".gts" and ".gjs" files are not recognized (#17464)
Problem:    ".gts" and ".gjs" files are not recognized.
Solution:   Recognize Glimmer flavored typescript and javascript.
            (closes vim/vim#9799)
cdf717283c
2022-02-19 23:41:11 +01:00
Michael Lingelbach
791e400858
fix: lsp and diagnostic highlight priority (#17461)
Closes https://github.com/neovim/neovim/issues/17456

* treesitter uses the default highlight priority of 50
* diagnostic highlights have a priority of 150
* lsp reference highlights have a priority of 200

This ensures proper ordering.
2022-02-19 08:38:14 -08:00
Sean Dewar
9c04285057
vim-patch:8.2.4422: autochdir test fails on MS-Windows
Problem:    Autochdir test fails on MS-Windows.
Solution:   Expecta nother error on MS-Windows.
adbb383e0f
2022-02-19 15:55:17 +00:00
Sean Dewar
73cc729dbc
vim-patch:8.2.4419: illegal memory access when using 20 highlights
Problem:    Illegal memory access when using exactly 20 highlights.
Solution:   Add one more item in the array. (Brandon Richardson,
            closes vim/vim#9800)
a493b6506b
2022-02-19 15:29:17 +00:00
Sean Dewar
9f4401897a
vim-patch:8.2.4418: crash when using special multi-byte character
Problem:    Crash when using special multi-byte character.
Solution:   Don't use isalpha() for an arbitrary character.
5921aeb574

Rename vim_isalpha to mb_isalpha.
2022-02-19 15:29:17 +00:00
Sean Dewar
30bf40ec4b
vim-patch:8.2.4403: ml_get error with nested folds and deleting lines
Problem:    ml_get error with nested folds and deleting lines.
Solution:   Correct the last line number before calling hasFoldingWin().
9437737833
2022-02-19 15:29:17 +00:00
James McCoy
5cb45dffba
Merge pull request #17454 from dundargoc/ci/labeler/test
ci(labeler): change "tests" to "test"
2022-02-18 16:55:41 -05:00
Dundar Göc
f7803c82d4 ci(labeler): change "tests" to "test" 2022-02-18 20:23:22 +01:00
Christian Clason
36362ef0ae
vim-patch:8.2.4414: solidity files are not recognized (#17451)
Problem:    Solidity files are not recognized.
Solution:   Add the *.sol pattern. (Dundar Goc, closes vim/vim#9792)
97b231541d
2022-02-18 17:08:43 +01:00
bfredl
5064ff126d
Merge pull request #17200 from lewis6991/_loadfile
refactor(lua): call `loadfile` internally instead of `luaL_loadfile`
2022-02-18 15:05:50 +01:00
James McCoy
720bb5844d
Merge pull request #17445 from dundargoc/ci/review/use-checkout 2022-02-18 08:36:45 -05:00
James McCoy
ac480ef6b4
Merge pull request #17404 from dundargoc/ci/put-each-test-in-separate-step
ci: run each test suite in a separate github step
2022-02-18 06:42:32 -05:00
James McCoy
3fb9987eef
Merge pull request #17450 from dundargoc/ci/lint/fix-key
ci(lint): simplify cache key
2022-02-18 06:14:53 -05:00
Dundar Göc
40473e55a2 ci(lint): simplify cache key 2022-02-18 11:50:51 +01:00
Lewis Russell
adad10284d refactor(lua): call loadfile internally
.. instead of luaL_loadfile

allows files to be cached
2022-02-18 10:39:45 +00:00
Dundar Göc
8b92d71b30 ci: run each test suite in a separate github step
This should help combat some of the lagginess when looking at the CI
logs in the browser.
2022-02-18 11:36:30 +01:00
zeertzjq
faeff49cbf
Merge pull request #17449 from zeertzjq/vim-8.2.3659
vim-patch:8.2.{3659,3660,3661}: integer overflow with large line number
2022-02-18 10:15:08 +08:00
zeertzjq
62a1290758 vim-patch:8.2.3661: test for put with large count fails
Problem:    Test for put with large count fails.
Solution:   Adjust the counts in the test.
8bc07e800c
2022-02-18 09:48:35 +08:00
zeertzjq
330b3da51e vim-patch:8.2.3660: overflow check uses wrong number
Problem:    Overflow check uses wrong number.
Solution:   Divide by ten.
9b0e82f35e
2022-02-18 09:48:32 +08:00
zeertzjq
3ed800e998 vim-patch:8.2.3659: integer overflow with large line number
Problem:    Integer overflow with large line number.
Solution:   Check for overflow. (closes vim/vim#9202)
03725c5795

Put E1247 in globals.h as E1240 is also there.
Do not make getdigits() abort.
2022-02-18 09:48:00 +08:00
Sean Dewar
592f4a7c08
Merge pull request #17433 from seandewar/vim-8.2.3492
vim-patch:8.2.{3492,3493,3570,3573,3574,3575,3577,3601}: put overflow checking shenanigans
2022-02-18 00:09:11 +00:00
Dundar Göc
1d0e38e42c ci: download reviews.js through checkout instead of wget
This makes testing the workflows much smoother.
2022-02-17 23:30:22 +01:00
James McCoy
df0fae2ff7
Merge pull request #17430 from dundargoc/test/remove-travis 2022-02-17 17:25:58 -05:00
Christian Clason
1fd106ca88
vim-patch:8.2.4411: bicep files are not recognized (#17447)
Problem:    Bicep files are not recognized.
Solution:   Match *.bicep files. (Dundar Goc, closes vim/vim#9791)
8e5ba693ad
2022-02-17 23:05:48 +01:00
James McCoy
d1e3d8abd6
Merge pull request #17427 from dundargoc/ci/lint/remove-unnecessary-steps 2022-02-17 16:54:11 -05:00
Dundar Göc
f3e6cc1a23 test: remove checks to see if current CI job is travis or appveyor 2022-02-17 22:43:48 +01:00
Dundar Göc
58a55e3889 ci(lint): remove unnecessary steps 2022-02-17 22:38:54 +01:00
James McCoy
387f6a9824
Merge pull request #17442 from dundargoc/ci/refactor/move-reviews 2022-02-17 15:56:47 -05:00
bfredl
3b5d456d3c
Merge pull request #17444 from clason/hl-empty-cterm
fix(api): allow empty list for cterm in nvim_set_hl
2022-02-17 19:37:45 +01:00
Christian Clason
e35a2d86fc fix(api): allow empty list for cterm in nvim_set_hl
Problem: when accessing `nvim_set_hl` from Lua, empty tables are converted
to empty lists, not dictionaries, resulting in an error for

    :lua vim.api.nvim_set_hl(0, "Comment", { cterm = {} })

Workaround: add an empty array as a special case when checking
`dict->cterm.type` and just set `cterm_mask_provided`.

(Proper solution: handle this in `gen_api_dispatch.lua`.)
2022-02-17 18:07:11 +01:00
Sean Dewar
41d0e7af20
vim-patch:8.2.3601: check for overflow in put count does not work well
Problem:    Check for overflow in put count does not work well.
Solution:   Improve the overflow check. (Ozaki Kiichi, closes vim/vim#9102)
fa53722367

Add some casts as Nvim uses size_t variables in some places.

We could technically adjust the logic to check for overflow outside of size_t's
range, but it's much easier to just port the patch exactly (also means we can
use the same tests).

v:sizeoflong is N/A, so convert the 64-bit tests to Lua and use the FFI to check
long's size.
2022-02-17 17:06:16 +00:00
Sean Dewar
8170260bb3
fix(ops): str_to_reg passing NULL to memcpy
Required for the tests introduced in v8.2.3601 to pass ASAN when running
test_alot.vim.

Co-authored-by: erw7 <erw7.github@gmail.com>
2022-02-17 15:00:32 +00:00
Sean Dewar
308c1952aa
vim-patch:8.2.3577: overflow check fails with 32 ints
Problem:    Overflow check fails with 32 ints.
Solution:   Only test with 64 bit ints.
0f0044125c
2022-02-17 14:45:23 +00:00
Sean Dewar
6890f8774b
vim-patch:8.2.3575: overflow check still fails when sizeof(int) == sizeof(long)
Problem:    Overflow check still fails when sizeof(int) == sizeof(long).
Solution:   Use a float to check the result.
e551ccfb93

This approach is... interesting...

Tests fail.
2022-02-17 14:45:23 +00:00
Sean Dewar
de8e2c61c1
vim-patch:8.2.3574: divide by zero
Problem:    Divide by zero.
Solution:   Don't check for overflow if multiplicand is zero.
8a1962d135
2022-02-17 14:45:22 +00:00
Sean Dewar
b149665689
vim-patch:8.2.3573: cannot decide whether to skip test that fails with 64 bit
Problem:    Cannot decide whether to skip test that fails with 64 bit ints.
            (closes vim/vim#9072)
Solution:   Add v:sizeofint, v:sizeoflong and v:sizeofpointer.  Improve the
            check for multiply overflow.
69b3072d98

Omit v:sizeof{int,long,pointer} as they're only really used for tests.
2022-02-17 14:45:22 +00:00
Sean Dewar
a256b710a2
vim-patch:8.2.3570: Test_very_large_count fails on 32bit systems
Problem:    Test_very_large_count fails on 32bit systems.
Solution:   Bail out when using 32 bit numbers. (closes vim/vim#9072)
ec6e63079d
2022-02-17 14:45:22 +00:00
Sean Dewar
3fba994de8
vim-patch:8.2.3493: large count test fails on MS-Windows
Problem:    Large count test fails on MS-Windows.
Solution:   Skip the test on MS-Windows.
cddd5ac911
2022-02-17 14:45:21 +00:00
Sean Dewar
ac5856b3f5
vim-patch:8.2.3492: crash when pasting too many times
Problem:    Crash when pasting too many times.
Solution:   Limit the size to what fits in an int. (closes vim/vim#8962)
eeed1c7ae0

Note that this overflow check pretty bad.
It also doesn't work well on Windows (where sizeof(int) == sizeof(long)).
This is all temporary; everything here is rewritten in future patches anyway.

e_resulting_text_too_long was already cherry-picked.

totlen is size_t in Nvim, but is int in Vim. This means we'll need some casts.

We could technically adjust the logic in do_put to use the entire range of
size_t in stuff like totlen, but there's not much gain, and it's much easier to
just port the patch like Vim as was done before (also allows us to use the same
tests).
2022-02-17 14:45:21 +00:00