Commit Graph

23698 Commits

Author SHA1 Message Date
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
dundargoc
0f91139074 build(cmake): add modelines to enable syntax highlighting 2022-10-21 11:48:12 +02:00
dundargoc
bc7daddaf0 build: rely on default cmake installation if possible
The default cmake installation process for dependencies that use cmake
on all platforms is in general more robust and less verbose, so we rely
on that if possible.
2022-10-21 11:48:12 +02:00
zeertzjq
a288b4f214
vim-patch:9.0.0806: 'langmap' works differently when there are modifiers (#20754)
Problem:    'langmap' works differently when there are modifiers.
Solution:   Only apply 'langmap' to a character where modifiers have no
            effect. (closes vim/vim#11395, closes vim/vim#11404)
49660f5139
2022-10-21 06:32:15 +08:00
Christian Clason
45ae5c6dc5
vim-patch:9.0.0808: jsonnet filetype detection has a typo (#20753)
Problem:    jsonnet filetype detection has a typo.
Solution:   Change "libjsonnet" to "libsonnet". (Maxime Brunet, closes vim/vim#11412)
6c8bc37a10
2022-10-20 22:49:22 +02:00
zeertzjq
ba887da977
Merge pull request #20748 from zeertzjq/vim-9.0.0804
vim-patch:partial:8.2.0418,9.0.0804: crash when trying to divide a number by -1
2022-10-20 22:47:46 +08:00
zeertzjq
d1484b58ae vim-patch:9.0.0804: crash when trying to divide a number by -1
Problem:    Crash when trying to divice the largest negative number by -1.
Solution:   Handle this case specifically.
cdef1cefa2
2022-10-20 22:21:01 +08:00
zeertzjq
be0f284ae1 vim-patch:partial: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

Only port test_expr.vim and the first hunk of test_cmdline.vim.
Add missing test from patch 7.4.1755.
Cherry-pick test_expr.vim change from patch 8.2.2060.
2022-10-20 22:08:46 +08:00
Justin M. Keyes
e6917306f6
docs: update vimdoc parser #20747
Remove the user-manual ToC from help.txt, because:
1. it duplicates usr_toc.txt
2. it is not what most readers are looking for in the main help page.

fix https://github.com/neovim/tree-sitter-vimdoc/issues/49
fix https://github.com/neovim/tree-sitter-vimdoc/issues/50
fix https://github.com/neovim/tree-sitter-vimdoc/issues/51
2022-10-20 06:20:02 -07:00
dundargoc
e33995e936
fix(build): duplicate version string "v0.8.0-v0.8.0" #20578
- Prevent duplicate version strings such as v0.8.0-v0.8.0.
- Change the format for git releases from v0.9.0-dev-67-g625ba79be to
  v0.9.0-dev-67+g625ba79be.

Nvim versions are now:
release                    : v0.9.0
prerelease without git info: v0.9.0-dev
prerelease with git info   : v0.9.0-dev-67+g625ba79be
2022-10-20 04:03:41 -07:00
Yee Cheng Chin
10ab7489eb
fix(docs-html): misaligned tabs after conceal #20690
Problem:
`gen_help_html.lua` does not properly handle tab characters after
"concealed" text (tags, taglinks, codespans). This causes misaligned
layout in "old" (preformatted) docs.

For text like `*tag*`, |tag_link|, and `code_span`, Vim hides the "*",
"|", "`" characters, but Vim still counts those characters for "virtual
column" when a tab character follows it. So if you have a tag of say
6 characters long, those two concealed character would lead to the tab
character after it start at column 8. gen_help_html.lua doesn't account
for that which leads to formatting flaws in the generated output.

Solution:
Add two spaces after concealed nodes that are followed by a tab char.
2022-10-20 03:22:46 -07:00
zeertzjq
3b0777cfa5
docs(news): mention 'splitkeep' #20744 2022-10-20 03:04:32 -07:00
ObserverOfTime
fad558b6af
vim-patch:9.0.0798: clang format configuration files are not recognized (#20741)
Problem:    Clang format configuration files are not recognized.
Solution:   Use yaml for Clang format configuration files. (Marwin Glaser,
            closes vim/vim#11398)
3c708c4390
2022-10-19 11:08:01 -06:00
zeertzjq
96cf385a7f
vim-patch:9.0.0739: mouse column not correctly used for popup_setpos (#20729)
Problem:    Mouse column not correctly used for popup_setpos.
Solution:   Adjust off-by-one error and handle Visual line selection properly.
            (Yee Cheng Chin, closes vim/vim#11356)
17822c507c

The test_termcodes.vim test cannot be used. Use a Lua test instead.
2022-10-19 11:32:26 +08:00
zeertzjq
a5d893bebd
revert: "oldtests: wait 200ms on mac for timer test" (#20728)
This reverts commit 3bad76008e.
2022-10-19 09:24:18 +08:00
zeertzjq
bcd25b2009
Merge pull request #20727 from zeertzjq/vim-9.0.0789
vim-patch:9.0.{0789,0790}
2022-10-19 08:16:53 +08:00
zeertzjq
88eeb4d941 vim-patch:9.0.0790: test for dummy buffer does not always produce the E86 error
Problem:    Test for dummy buffer does not always produce the E86 error.
Solution:   Do not check if the error is produced.
53c5c9f50c
2022-10-19 07:15:27 +08:00
zeertzjq
66933b45dc vim-patch:9.0.0789: dummy buffer ends up in a window
Problem:    Dummy buffer ends up in a window.
Solution:   Disallow navigating to a dummy buffer.
8f3c3c6cd0
2022-10-19 07:14:59 +08:00
zeertzjq
22473672aa
vim-patch:9.0.0788: ModeChanged autocmd not executed when Visual ends with CTRL-C (#20722)
Problem:    ModeChanged autocmd not executed when Visual mode is ended with
            CTRL-C.
Solution:   Do not trigger the autocmd when got_int is set. (closes vim/vim#11394)
61c4b04799

Cherry-pick removal of cmdwin feature check from patch 9.0.0663.
2022-10-19 07:05:54 +08:00
Lewis Russell
a5a5e27323
refactor(window.c): reduce scope of locals (#20301) 2022-10-18 23:06:10 +01:00
Christian Clason
228a04070e
vim-patch:9.0.0779: lsl and lm3 file extensions are not recognized (#20704)
Problem:    lsl and lm3 file extensions are not recognized.
Solution:   Add *.lsl and *.lm3 patterns. (Doug Kearns, closes vim/vim#11384)
4ac8e7948c
2022-10-18 20:05:50 +02:00
Christian Clason
aa2f08a050
fix(highlight): link more treesitter groups by default (#20711)
Problem: Captures used by bundled parsers are not highlighted by default
Solution: Add links to default groups

A link is added for a capture if
* there is a default group of the same name (e.g., `@tag` -> `Tag`)
* it's used in a bundled query and doesn't have a reasonable fallback
  (e.g., `@text.literal`)

Also add all linked groups to the treesitter docs.
2022-10-18 18:46:09 +02:00