Commit Graph

23819 Commits

Author SHA1 Message Date
zeertzjq
ef363ed37c vim-patch:8.2.0619: null dict is not handled like an empty dict
Problem:    Null dict is not handled like an empty dict.
Solution:   Fix the code and add tests. (Yegappan Lakshmanan, closes vim/vim#5968)

ea04a6e8ba

Nvim doesn't support modifying NULL list, so comment out a line.
2022-10-26 20:53:39 +08:00
zeertzjq
cfccae9584 vim-patch:8.2.0610: some tests are still old style
Problem:    Some tests are still old style.
Solution:   Convert to new style tests. (Yegappan Lakshmanan, closes vim/vim#5957)

08f4157c5c

Fix missing error message when sort() compare function fails.
Cherry-pick a line in test_utf8.vim from patch 8.2.0448.
Cherry-pick builtin_function() change from patch 8.2.0595.
2022-10-26 20:53:39 +08:00
zeertzjq
d60fa43466
Merge pull request #20813 from zeertzjq/vim-8.2.0163
vim-patch:8.2.{0162,0163}
2022-10-26 18:49:15 +08:00
zeertzjq
19eca77af4 vim-patch:8.2.0163: test hangs on MS-Windows console
Problem:    Test hangs on MS-Windows console.
Solution:   use feedkeys() instead of test_feedinput(). (Ken Takata)

272ca95fc3

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-10-26 18:22:49 +08:00
zeertzjq
a0ade77353 vim-patch:8.2.0162: balloon test fails in the GUI
Problem:    Balloon test fails in the GUI.
Solution:   Skip test in the GUI.

7d8ea0b241

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-10-26 18:22:49 +08:00
zeertzjq
fed86bc78a
fix(spell): fix wrong cast (#20810)
Fix #20787
2022-10-26 17:18:05 +08:00
zeertzjq
c00844aee4
Merge pull request #20806 from zeertzjq/vim-8.2.0401
vim-patch:7.4.{1081,1097},8.2.{0401,0418}: eval tests
2022-10-26 14:38:26 +08:00
zeertzjq
7b39ce36a4 vim-patch:8.2.0418: code in eval.c not sufficiently covered by tests
Problem:    Code in eval.c not sufficiently covered by tests.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#5815)

8b63313510

Nvim does not have v:none, so comment out test for it.
2022-10-26 13:52:42 +08:00
zeertzjq
d40739843c vim-patch:8.2.0401: not enough test coverage for evalvars.c
Problem:    Not enough test coverage for evalvars.c.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#5804)

8dfcce3a78

Assert E475 instead of E474 in :redir test because a later patch changed
the error number.

Comment out the test for :echo with a deeply nested container as Nvim
implements :echo very differently.
2022-10-26 13:41:31 +08:00
zeertzjq
b4c250d37b vim-patch:7.4.1097
Problem:    Looking up the alloc ID for tests fails.
Solution:   Fix the line computation.  Use assert_fails() for unlet test.

065ee9aebf

Use v:count and v:errmsg instead of count and errmsg.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-10-26 13:41:31 +08:00
zeertzjq
0fb08f3539 vim-patch:7.4.1081
Problem:    No test for what previously caused a crash.
Solution:   Add test for unletting errmsg.

254b105b75

Use v:errmsg instead of errmsg.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-10-26 13:41:31 +08:00
zeertzjq
ec33edc7b7
Merge pull request #20803 from zeertzjq/vim-8.2.0179
vim-patch:8.2.{0179,0211}: tests for range()
2022-10-26 12:53:45 +08:00
zeertzjq
0aaef07224 vim-patch:8.2.0211: test for ANSI colors fails without an "ls" command
Problem:    Test for ANSI colors fails without an "ls" command.
Solution:   Use "dir". (Ken Takata, closes vim/vim#5582)

94255df057

Cherry-pick test_functions.vim change from patch 8.2.0186.
2022-10-26 12:08:50 +08:00
zeertzjq
3c5b435801 vim-patch:8.2.0179: still a few places where range() does not work
Problem:    Still a few places where range() does not work.
Solution:   Fix using range() causing problems.

b09920203a

Code is mostly N/A.
Cherry-pick all of Test_range() from patch 8.2.0159.

- Use nvim_input() instead of test_feedinput()
- Assert a different result from json_encode()
- Assert a different error for sign_undefine()

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-10-26 12:08:42 +08:00
Lewis Russell
395a271253 refactor(diff.c): copy lines via memmove 2022-10-25 10:06:00 +01:00
Lewis Russell
49c2da432b refactor(diff.c): factor out diffblock deletion 2022-10-25 10:05:53 +01:00
bfredl
40791f8e82
Merge pull request #20775 from shadmansaleh/fix/opt_tal_not_redrawing_tabline
fix: setting tabline option not redrawing tabline
2022-10-24 20:05:02 +02:00
shadmansaleh
a53998ae78 fix: setting tabline option not redrawing tabline
With #20374 tabline option is marked with 'statuslines' redraw flag.
But 'statuslines' doesn't redraw tabline. As a result, tabline doesn't
get redrawn when tabline option is set and statuslines get unnecessarily redrawn.

This patch fixes the issue by adding a new redraw flag P_RTABL to redraw
tabline.
2022-10-24 21:14:41 +06:00
Lewis Russell
6da2271a04
Merge pull request #20785 from lewis6991/refactor/diff.c_2 2022-10-24 14:56:06 +01:00
Lewis Russell
bf60b9134b refactor(diff.c): internal does not need diffstyle 2022-10-24 14:34:19 +01:00
Lewis Russell
b2011bae3e refactor(diff.c): simplify diff_buf_idx() 2022-10-24 14:31:57 +01:00
Lewis Russell
b15f7007eb refactor(diff.c): factor out hunk processing 2022-10-24 14:31:56 +01:00
dundargoc
69ffbda84d
build: preprocess vim patches with uncrustify #20786
This will enable a larger amount of chunks being automatically included
due to fewer formatting differences between the vim and neovim files.

The strategy is straightforward, if a bit tedious:

- Get a list of all changed files.
- Checkout parent commit. Copy all relevant files to a temporary
  location.
- Checkout patch commit. Copy all relevant files to a temporary
  location.
- Format .c and .h files with uncrustify.
- Generate a diff from from these files.

Closes https://github.com/neovim/neovim/issues/6226
2022-10-24 06:27:52 -07:00
Lewis Russell
29f138d5ad refactor(diff.c): factor out hunk extraction 2022-10-24 13:57:26 +01:00
Lewis Russell
267494151b refactor(diff.c): allocate hunks directly in ga_array 2022-10-24 13:57:21 +01:00
Lewis Russell
a6e404b7d5 refactor(diff.c): remove char_u declarations 2022-10-24 13:54:31 +01:00
NAKAI Tsuyoshi
4573cfa3ad
fix(lua): pesc, tbl_islist result types #20751
Problem:
- pesc() returns multiple results, it should return a single result.
- tbl_islist() returns non-boolean in some branches.
- Docstring: @generic must be declared first

Solution:
Constrain docstring annotations.
Fix return types.

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2022-10-24 05:53:53 -07:00
dundargoc
1248c12666
ci(lintcommit): enforce common scope names #20393
This is useful to ensure related commits aren't spread out when
generating the changelog.
2022-10-24 04:24:08 -07:00
zeertzjq
f445f6b003
Merge pull request #20791 from zeertzjq/vim-8.2.0908
vim-patch:8.2.0908: crash when changing the function table while listing it
2022-10-24 16:50:37 +08:00
zeertzjq
0ed1429fcb test: add a test for a crash fixed by patch 8.2.0908 2022-10-24 16:29:28 +08:00
zeertzjq
c5f280c522 vim-patch:8.2.0908: crash when changing the function table while listing it
Problem:    Crash when changing the function table while listing it.
Solution:   Bail out when the function table changes. (closes vim/vim#6209)

3fffa97159

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-10-24 16:29:28 +08:00
Christian Clason
29fe3348ba
build(deps): bump vimdoc parser and queries to v1.2.4 (#20788) 2022-10-24 09:35:00 +02:00
Lewis Russell
57fdfc1c90 refactor(diff.c): break up ex_diffgetput()
Problem: ex_diffgetput is too big
Solution: factor out main loop into function

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-10-23 12:41:00 +01:00
ii14
7718241286
docs: ":che" is ":checkhealth" #20147 2022-10-23 04:04:23 -07:00
Maxime Brunet
144d7b37ac
feat(vim-patch): mention original author #20772 2022-10-23 04:03:25 -07:00
dundargoc
3f80df368e
docs(maintain): CI strategy #20778
It's only focused on GitHub Actions since that is the primary CI
provider we use at the moment.
2022-10-22 22:52:45 -07:00
dundargoc
1887d8d7d0
docs: fix typos (#20724)
Co-authored-by: Marco Lehmann <m99@posteo.de>
2022-10-23 09:45:39 +08:00
Lewis Russell
d70193c326
refactor(diff.c): reduce scope of variables (#20781)
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-10-23 00:57:51 +01:00
zeertzjq
2f9b94a268
fix(ui): send grid_resize events before triggering VimResized (#20760) 2022-10-22 07:53:39 +08:00
bfredl
90138d5ed8
Merge pull request #20770 from dundargoc/refactor/lint
refactor: fix uncrustify lint errors
2022-10-21 17:45:10 +02:00
dundargoc
abf758a297 refactor: fix uncrustify lint errors 2022-10-21 16:46:03 +02:00
Christian Clason
8371907203
vim-patch:9.0.0814: aws config files are not recognized (#20769)
vim-patch:436e5d395fd6 (since upstream tagged the wrong commit)

Problem:    Aws config files are not recognized.
Solution:   Use "confini" for aws config files. (Justin M. Keyes,
            closes vim/vim#11416)
436e5d395f
2022-10-21 16:36:43 +02:00
dundargoc
fa6556515f
Merge pull request #20664 from dundargoc/refactor/uncrustify
refactor(uncrustify): improved formatting rules
2022-10-21 16:26:54 +02:00
dundargoc
a11e96edfc docs(dev-style): remove rules covered by uncrustify
There's no reason for contributors to learn rules that can be automated
away.
2022-10-21 16:23:33 +02:00
dundargoc
6ff245732a refactor(uncrustify): improved formatting rules 2022-10-21 16:23:32 +02:00
dundargoc
b967cb2e03 refactor(uncrustify): move macros definitions to enable formatting
Uncrustify struggles to format function-like macros which are defined in
deeply nested areas of the code. Un-nesting them unblocks useful
formatting rules from uncrustify.
2022-10-21 16:22:25 +02:00
dundargoc
784e498c4a
refactor: clang-tidy fixes to silence clangd warning (#20683)
* refactor: readability-uppercase-literal-suffix

* refactor: readability-named-parameter

* refactor: bugprone-suspicious-string-compare

* refactor: google-readability-casting

* refactor: readability-redundant-control-flow

* refactor: bugprone-too-small-loop-variable

* refactor: readability-non-const-parameter

* refactor: readability-avoid-const-params-in-decls

* refactor: google-readability-todo

* refactor: readability-inconsistent-declaration-parameter-name

* refactor: bugprone-suspicious-missing-comma

* refactor: remove noisy or slow warnings
2022-10-21 20:47:44 +08:00
Christian Clason
e554f5c545
fix(filetype): don't pass empty string to detect (#20766)
Problem: `*.db` files use empty string as default filetype, which is
inconsistent with the rest of the code which uses `nil` instead.
Solution: don't pass a default empty string
2022-10-21 14:04:53 +02:00
Justin M. Keyes
24c9561a68
vim-patch: bump VIM_VERSION from 8.0 => 8.1 #20762
There are 6 remaining 8.0.x patches, tracked in:
https://github.com/neovim/neovim/issues/5431
2022-10-21 03:56:09 -07:00
dundargoc
45c8679493 build: give example on complex regexes
This is just to allow the reader to get a quick understanding without
necessarily needing to know all the regex intricasies.
2022-10-21 11:57:10 +02:00