Commit Graph

23307 Commits

Author SHA1 Message Date
zeertzjq
747b8dac73 fix(mouse): ensure no scrolling with "ver:0" in 'mousescroll'
(cherry picked from commit b3360f0734)
2022-10-29 23:11:13 +00:00
zeertzjq
f70feadb17
Merge pull request #20870 from neovim/backport-20854-to-release-0.8
[Backport release-0.8] fix: avoid unsigned overflow in home_replace()
2022-10-30 07:06:30 +08:00
zeertzjq
06144afb71 fix: avoid unsigned overflow in home_replace()
(cherry picked from commit d3ac297554)
2022-10-29 22:50:14 +00:00
github-actions[bot]
5eab16fa24
[Backport release-0.8] docs(api): pattern is not expanded for autocommands (#20838)
docs(api): pattern is not expanded for autocommands

Problem: Unlike `:autocmd`, `nvim_create_autocommand()` does not expand
environment variables in the `pattern`, which is unexpected.

Solution: Add a note to the documentation explaining this and suggesting
using `expand()` explicitly.

(cherry picked from commit eeaf943ca3)

Co-authored-by: Christian Clason <c.clason@uni-graz.at>
2022-10-27 18:59:25 -07:00
zeertzjq
ddc0b75d53
Merge pull request #20811 from neovim/backport-20810-to-release-0.8
[Backport release-0.8] fix(spell): fix wrong cast
2022-10-26 17:34:50 +08:00
zeertzjq
7aaa0f4888 fix(spell): fix wrong cast
Fix #20787

(cherry picked from commit 0b2ef98594)
2022-10-26 09:18:45 +00:00
zeertzjq
c34ebe60be
Merge pull request #20755 from neovim/backport-20754-to-release-0.8
[Backport release-0.8] vim-patch:9.0.0806: 'langmap' works differently when there are modifiers
2022-10-21 07:12:37 +08:00
zeertzjq
06c63f50fc vim-patch:9.0.0806: 'langmap' works differently when there are modifiers
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
(cherry picked from commit e8877c4d7b)
2022-10-20 22:32:55 +00:00
github-actions[bot]
32ccb9770b
[Backport release-0.8] build: don't append git tag on release versions (#20746)
build: don't append git tag on release versions

This prevents duplicate version strings such as v0.8.0-v0.8.0.

Also change the format for git releases from v0.9.0-dev-67-g625ba79be
to v0.9.0-dev-67+g625ba79be. The neovim 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

(cherry picked from commit 90785aafe1)

Co-authored-by: dundargoc <gocdundar@gmail.com>
2022-10-20 05:25:41 -07:00
github-actions[bot]
f73bc880f4
[Backport release-0.8] feat(docs): update parser, HTML gen (#20737)
Note: although the tolerance in help_spec.lua increased, the actual
error count with the new parser decreased by about 20%. The difference
is that the old ignore_parse_error() ignored many more errors with the
old parser.

fix https://github.com/neovim/tree-sitter-vimdoc/issues/37
fix https://github.com/neovim/tree-sitter-vimdoc/issues/44
fix https://github.com/neovim/tree-sitter-vimdoc/issues/47

(cherry picked from commit 10ae8ccbf2)
2022-10-19 06:02:01 -07:00
github-actions[bot]
f76473898d
[Backport release-0.8] build(deps): bump vimdoc (help) parser to v1.2.1 (#20736)
build(deps): bump vimdoc (help) parser to v1.2.1

(cherry picked from commit fdb15c3c3f)

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2022-10-19 05:14:45 -07:00
github-actions[bot]
5a14c820a9
[Backport release-0.8] docs: fix/remove invalid URLs (#20735)
docs: fix/remove invalid URLs

(cherry picked from commit ec1e71109c)

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2022-10-19 05:06:20 -07:00
github-actions[bot]
e7ed53286e
[Backport release-0.8] fix(highlight): link more treesitter groups by default (#20731)
fix(highlight): link more treesitter groups by default

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.

(cherry picked from commit 0ee8b88b10)

Co-authored-by: Christian Clason <c.clason@uni-graz.at>
2022-10-19 09:35:47 +02:00
zeertzjq
7e8662676a
Merge pull request #20730 from neovim/backport-20729-to-release-0.8
[Backport release-0.8] vim-patch:9.0.0739: mouse column not correctly used for popup_setpos
2022-10-19 12:20:50 +08:00
zeertzjq
cb086f1886 vim-patch:9.0.0739: mouse column not correctly used for popup_setpos
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.

(cherry picked from commit 72d2f5aef4)
2022-10-19 03:33:04 +00:00
zeertzjq
9234e5acd6
Merge pull request #20718 from neovim/backport-20716-to-release-0.8
[Backport release-0.8] vim-patch:9.0.0786: user command does not get number from :tab modifier
2022-10-18 21:49:37 +08:00
zeertzjq
24769cf1b5 vim-patch:9.0.0786: user command does not get number from :tab modifier
Problem:    User command does not get number from :tab modifier.
Solution:   Include the number. (closes vim/vim#11393, closes vim/vim#6901)
208567e9d7
(cherry picked from commit a43a46f1e6)
2022-10-18 12:47:19 +00:00
zeertzjq
6fe00190f0
Merge pull request #20710 from neovim/backport-20709-to-release-0.8
[Backport release-0.8] fix(qflist): avoid read of uninitialized memory
2022-10-18 10:52:26 +08:00
Mahmoud Al-Qudsi
50f756ceb2 fix(qflist): avoid read of uninitialized memory
If the call to `qf_setup_state()` in `qf_init_ext()` fails, control flow jumps
to label `qf_init_end` where a call to `qf_update_buffer()` is made with
`old_last` as a function call argument.

Prior to this patch, `old_last` would not yet have been initialized to its
default value of `NULL`, resulting in `qf_update_buffer()` attempting to compare
against its uninitialized value (quickfix.c:3882) then later forwarding it to
`qf_fill_buffer()` where the address is dereferenced and repeatedly read from/
written to for performing core qflist operations.

Depending on what the default value of `old_last` was, the results may range
from a best case scenario of neovim terminating with SIGSEGV from an attempt to
dereference an invalid pointer (quickfix.c:4056) to memory corruption if it
contained some other value that results in `qfp` being initialized from
`old_last->qf_next` (after which it is subsequently written to and read from in
a fairly arbitrary fashion).

Though extremely unlikely, it's possible for there to be security considerations
as a user can ensure that the next call to `qf_setup_state()` fails.

This patch ensures that `old_last` is NULL-assigned before control flow jumps to
`qf_init_end`.

Closes #20639.

(cherry picked from commit 8a762eba60)
2022-10-18 02:16:00 +00:00
Lewis Russell
47454d0012
[Backport release-0.8] fix(decoration): call providers in win_update() earlier (#20699)
fix(decoration): call providers in win_update() earlier

Fixes #20651

(cherry picked from commit 2921de6a96)
2022-10-18 00:14:27 +01:00
github-actions[bot]
c52d256e91
[Backport release-0.8] fix(decoration): redraw correctly when re-using ids (#20708)
Co-authored-by: Lewis Russell <lewis6991@gmail.com>
2022-10-17 22:07:49 +01:00
zeertzjq
59087b615d
Merge pull request #20701 from neovim/backport-20662-to-release-0.8
[Backport release-0.8] vim-patch:8.1.0342,9.0.{0614,0616}: SpellFileMissing autocmd may delete buffer
2022-10-17 21:40:32 +08:00
zeertzjq
89fbffff13 vim-patch:9.0.0616: spell test fails because error message changed
Problem:    Spell test fails because error message changed.
Solution:   Adjust expected error message.
371951d0c3
(cherry picked from commit a9452cf3d5)
2022-10-17 13:02:22 +00:00
zeertzjq
7ba968ef3b vim-patch:9.0.0614: SpellFileMissing autocmd may delete buffer
Problem:    SpellFileMissing autocmd may delete buffer.
Solution:   Disallow deleting the current buffer to avoid using freed memory.
ef976323e7
(cherry picked from commit 6bc2d6b66b)
2022-10-17 13:02:22 +00:00
zeertzjq
8595f0298a vim-patch:8.1.0342: crash when a callback deletes a window that is being used
Problem:    Crash when a callback deletes a window that is being used.
Solution:   Do not unload a buffer that is being displayed while redrawing the
            screen. Also avoid invoking callbacks while redrawing.
            (closes vim/vim#2107)
94f01956a5

Omit parse_queued_messages(): N/A.
Cherry-pick a break statement from patch 8.1.0425.

(cherry picked from commit 65cbe0cc35)
2022-10-17 13:02:22 +00:00
github-actions[bot]
7a011cb58d
vim-patch:9.0.0750: crash when popup closed in callback (#20660)
vim-patch:9.0.0750: crash when popup closed in callback

Problem:    Crash when popup closed in callback. (Maxim Kim)
Solution:   In syntax_end_parsing() check that syn_block is valid.
0abd6cf62d
(cherry picked from commit 2a2ae32ceb)
2022-10-15 07:31:41 +08:00
rti
5b1bda14ae
[Backport release-0.8] build(nix): change the pkgs to final, add new version of libvterm (#20640)
build(nix): change the pkgs to final, add new version of libvterm (#20410)

Co-authored-by: Philipp Herzog <philipp.herzog@protonmail.com>
2022-10-13 16:29:26 -07:00
Justin M. Keyes
1cd5361c39
Merge pull request #20617 from neovim/backport-20558-to-release-0.8
[Backport release-0.8] feat(docs-html): fixes; use tags for ToC headings
2022-10-12 09:11:56 -04:00
Justin M. Keyes
719afa2988 Merge 'upstream/release-0.8' 2022-10-12 14:23:31 +02:00
Justin M. Keyes
60ccada4cb fix duplicate tags
These are deprecated but not removed in 0.8.x.
They are removed in master / 0.9.x.
2022-10-12 14:19:46 +02:00
zeertzjq
6b49a20137
docs(lsp): vim.lsp.range_code_action() is not deprecated 2022-10-12 20:16:13 +08:00
zeertzjq
5f54cfcc05
Revert [Backport release-0.8] docs(lsp): add formatting APIs to deprecated.txt (#20614) 2022-10-12 20:10:46 +08:00
Justin M. Keyes
bca9b1ecdf feat(docs-html): try to use tags for ToC headings
Problem:
The generated ToC (table of contents) uses anchors derived from the
heading title, e.g. the "Global Plugins" heading yields:
https://neovim.io/doc/user/usr_05.html#_global-plugins-
so if the heading title changes, then the old URL (anchor) is broken.

Solution:
:help tags change less often than heading titles, so if a heading
contains a *tag*, use that as its anchor name instead. Example:
https://neovim.io/doc/user/usr_05.html#standard-plugin

(cherry picked from commit 6b01e9bf87)
2022-10-12 12:09:10 +00:00
Justin M. Keyes
5e88506508 fix(docs-html): update parser
- Improve generated HTML by updating parser which includes fixes for
  single "'" and single "|":
  https://github.com/neovim/tree-sitter-vimdoc/pull/31
- Updated parser also fixes the conceal issue for "help" highlight
  queries https://github.com/neovim/tree-sitter-vimdoc/issues/23 by
  NOT including whitespace in nodes.
  - But this means we need to restore the getws() function which scrapes
    leading whitespace from the original input (buffer).

(cherry picked from commit a7a83bc4c2)
2022-10-12 12:09:10 +00:00
github-actions[bot]
f294712d8c
[Backport release-0.8] doc (#20616)
docs: various

- increase python line-length limit from 88 => 100.
- gen_help_html: fix bug in "tag" case (tbl_count => tbl_contains)

ref #15632
fix #18215
fix #18479
fix #20527
fix #20532

Co-authored-by: Ben Weedon <ben@weedon.email>
(cherry picked from commit f37cd2bb15)

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2022-10-12 05:08:18 -07:00
github-actions[bot]
acb8033bca
[Backport release-0.8] docs: fix incorrect :help tag (#20615)
fix: incorrect :help tag

vim.lsp.format() doesn't exist, which causes functionaltest to fail.
Change to vim.lsp.buf.format().

(cherry picked from commit 29a7f92e2e)

Co-authored-by: dundargoc <gocdundar@gmail.com>
2022-10-12 05:04:18 -07:00
github-actions[bot]
a6b62821de
[Backport release-0.8] docs(lsp): add formatting APIs to deprecated.txt (#20614)
docs: add vim APIs to deprecated.txt

Add vim.lsp.buf.formatting() to deprecated.txt.
Add vim.lsp.buf.range_formatting() to deprecated.txt.

(cherry picked from commit a99669df1c)

Co-authored-by: steventhorne <steven.thorne91@gmail.com>
2022-10-12 05:03:09 -07:00
zeertzjq
deda165155
Merge pull request #20601 from neovim/backport-20576-to-release-0.8
[Backport release-0.8] feat(man): add health check
2022-10-12 06:24:17 +08:00
github-actions[bot]
2853284434
[Backport release-0.8] fix(runtime): properly rely on t_Co for colorschemes (#20604)
fix(runtime): properly rely on t_Co for colorschemes

Problem: check for available colors failed
Solution: simply trust t_Co, which is always available
(cherry picked from commit 5dbc713de7)

Co-authored-by: Christian Clason <c.clason@uni-graz.at>
2022-10-11 23:49:05 +02:00
Lewis Russell
62e3ca3e2b feat(man): add health check
Fixes #20432

(cherry picked from commit 4ccc57fd7a)
2022-10-11 16:01:53 +00:00
github-actions[bot]
0f669b7b70
[Backport release-0.8] build(deps): bump vimdoc parser to v1.2.0 (#20592)
build(deps): bump vimdoc parser to v1.2.0

(cherry picked from commit 0b95e83e1b)

Co-authored-by: Christian Clason <c.clason@uni-graz.at>
2022-10-11 07:49:42 -07:00
github-actions[bot]
29aa6e715b
docs: regenerate [skip ci] (#20589)
Co-authored-by: marvim <marvim@users.noreply.github.com>
2022-10-11 05:09:33 -07:00
github-actions[bot]
d92e6acc46
[Backport release-0.8] fix(docs-html): keycodes, taglinks, column_heading (#20590)
fix(docs-html): keycodes, taglinks, column_heading

Problem:
- Docs HTML: "foo ~" headings (column_heading) are not aligned with
  their table columns/contents because the leading whitespace is not
  emitted.
- taglinks starting with hyphen like |-x| were not recognized.
- keycodes like `<foo>` and `CTRL-x` were not recognized.
- ToC is not scrollable.

Solution:
- Add ws() to the column_heading case.
- Update help parser to latest version
  - supports `keycode`
  - fixes for taglink, argument
- Update .toc CSS. https://github.com/neovim/neovim.github.io/issues/297

fix https://github.com/neovim/neovim.github.io/issues/297

(cherry picked from commit 6d74676848)

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2022-10-11 05:04:51 -07:00
github-actions[bot]
00761ad1e6
[Backport release-0.8] feat(docs): format parameter list as a list (#20588)
feat(docs): format parameter list as a list

Problem:
The {foo} parameters listed in `:help api` and similar generated docs,
are intended to be a "list" but they aren't prefixed with a list symbol.
This prevents parsers from understanding the list, which forces
generators like `gen_help_html.lua` to use hard-wrapped/preformatted
layout instead of a soft-wrapped "flow" layout.

Solution:
Modify gen_vimdoc.py to prefix {foo} parameters with a "•" symbol.

(cherry picked from commit 24e5b5c8c7)

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2022-10-11 04:46:30 -07:00
github-actions[bot]
47cd3cf852
[Backport release-0.8] feat(docs): remove old AWK scripts, update HTML generator (#20587)
* feat(docs): nested lists in HTML, update :help parser

- Docs HTML: improvements in https://github.com/neovim/tree-sitter-vimdoc
  allow us to many hacks in `gen_help_html.lua`.
- Docs HTML: support nested lists.
- Docs HTML: avoid extra newlines (too much whitespace) in old
  (preformatted) layout.
- Docs HTML: disable golden-grid for narrow viewport.
- Workaround for https://github.com/neovim/neovim/issues/20404

closes https://github.com/neovim/neovim/issues/20404

(cherry picked from commit 088abbeb6e)

* feat(gen_help_html.lua): remove old AWK scripts

These files are no longer needed since gen_help_html.lua is working
fairly well.

ref https://github.com/neovim/neovim/pull/11967

(cherry picked from commit 03bc23de36)

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2022-10-11 04:19:38 -07:00
zeertzjq
00ce3d6e7a
Merge pull request #20585 from neovim/backport-20584-to-release-0.8
[Backport release-0.8] refactor: explicitly convert HANDLE to intptr_t for _open_osfhandle()
2022-10-11 12:05:44 +08:00
Wei Tang
aaee148392 refactor: explicitly convert HANDLE to intptr_t for _open_osfhandle()
Problem:
The first parameter of "_open_osfhandle()" is an intptr_t; however, a HANDLE is passed.
The official documentation of [_open_osfhandle](https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/open-osfhandle) suggests to cast the HANDLE to intptr_t.
MSVC/cl is able to perform an implicit type cast.
However, LLVM/clang-cl will generate an compilation error.

Solution:
Explicitly convert HANDLE to intptr_t for _open_osfhandle().

(cherry picked from commit 63ab3337e0)
2022-10-11 03:30:35 +00:00
zeertzjq
9ad6f0da83
Merge pull request #20573 from neovim/backport-20572-to-release-0.8
[Backport release-0.8] vim-patch:9.0.0713: <amatch> of MenuPopup event is expanded like a file name
2022-10-10 22:05:48 +08:00
zeertzjq
bca4588e17 vim-patch:9.0.0713: <amatch> of MenuPopup event is expanded like a file name
Problem:    <amatch> of MenuPopup event is expanded like a file name.
Solution:   Do not expand <amatch> for MenuPopup. (closes vim/vim#11328)
c601d988b6
(cherry picked from commit 4b2c5be6e6)
2022-10-10 13:27:01 +00:00
github-actions[bot]
126e434fec
[Backport release-0.8] fix(lua): assert failure with vim.regex() error inside :silent! (#20560)
Co-authored-by: Rustum Zia <ziarustum@gmail.com>
Co-authored-by: RZia <36330543+grassdne@users.noreply.github.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-10-10 08:43:57 +08:00