Commit Graph

23283 Commits

Author SHA1 Message Date
github-actions[bot]
922a3c33f1
[Backport release-0.8] fix(lsp): ensure open_logfile is safe for fast events (#21290)
fix(lsp): ensure open_logfile is safe for fast events

Closes https://github.com/neovim/neovim/issues/21052

(cherry picked from commit a4100e1072)

Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
2022-12-04 19:05:27 +01:00
zeertzjq
4d0fabfe4b
Merge pull request #21263 from neovim/backport-20993-to-release-0.8
[Backport release-0.8] build: restrict `git describe` to top level source directory
2022-12-02 21:48:25 +08:00
Jan Palus
4bef100e47 build: restrict git describe to top level source directory
fix version determination when building neovim from release tarball
extracted within another git repository

(cherry picked from commit 53ba7b9a5a)
2022-12-02 12:46:15 +00:00
zeertzjq
346f77c5a6
Merge pull request #21219 from neovim/backport-20894-to-release-0.8
[Backport release-0.8] vim-patch:9.0.0821: crash with win_move_statusline() in another tabpage
2022-11-29 00:30:49 +08:00
zeertzjq
4152151c94 vim-patch:9.0.0821: crash with win_move_statusline() in another tabpage
vim-patch:86e6717ace4f

Problem:    Crash when using win_move_statusline() in another tab page.
Solution:   Check for valid window pointer. (issue vim/vim#11427)

86e6717ace

Co-authored-by: Bram Moolenaar <Bram@vim.org>
(cherry picked from commit d2a22242fb)
2022-11-28 16:30:18 +00:00
Christian Clason
742bd4c181
Merge pull request #21127 from neovim/backport-20489-to-release-0.8
[Backport release-0.8] memory: fix memory alignment for dynamic allocation
2022-11-19 22:43:54 +01:00
bfredl
41192dae78 refactor(memory): simplify new alignment logic
In particular, we can assume the xmalloc-ed pointer is at least
double-aligned, otherwise nothing work work.

(cherry picked from commit 8b7247af7d)
2022-11-19 20:07:30 +00:00
Jan Palus
9c32331904 fix(memory): fix memory alignment for dynamic allocation
all pointers returned by arena_alloc residing in arena block should be
properly aligned

to meet neovim's alignment requirements but keeping it simple settle on
ARENA_ALIGN = MAX(sizeof(void *), sizeof(double)).

(cherry picked from commit 0240fd6d0f)
2022-11-19 20:07:30 +00:00
bfredl
b994deb0aa version bump 2022-11-14 10:16:44 +01:00
bfredl
935615ffed NVIM 0.8.1
This is mainly a bugfix release, but there a few feature additions.

Features
- extmarks: Allow preventing spellchecking with spell = false
- spell: Support nospell in treesitter queries
- man: Add health check
- docs-html: Try to use tags for ToC headings

Bug Fixes
- ui: Setting 'cmdheight' with global statusline
- ui: Fix highlights not being updated with 'winhl'
- Make_filter_cmd for :! powershell
- :! pwsh redirection for `command not found`
- Find multibyte file name in line
- Avoid unsigned overflow in home_replace()
- docs-html: Update parser
- folds: Fix fold marker multibyte comparison
- health: Correct tmux rgb verification
- man.lua: Set modifiable before writing page
- mouse: Ensure no scrolling with "ver:0" in 'mousescroll'
- paste: Feed keys as typed in cmdline mode
- qflist: Avoid read of uninitialized memory
- spell: Fix wrong cast
- stdpath: Default to /tmp if stdpath('run') cannot be created
- tui: Resume main thread if suspending isn't implemented

Documentation
- lsp: Vim.lsp.range_code_action() is not deprecated
2022-11-14 10:12:05 +01:00
bfredl
3e0783db43
Merge pull request #21042 from neovim/backport-20178-to-release-0.8
[Backport release-0.8] feat(extmarks): allow preventing spellchecking with spell = false
2022-11-13 11:16:36 +01:00
bfredl
32b0b13cc5
Merge pull request #21041 from neovim/backport-21033-to-release-0.8
[Backport release-0.8] fix(ui): fix some cases of stale highlight definitions
2022-11-13 11:10:12 +01:00
Lewis Russell
3d0ddd2d1f feat(spell): support nospell in treesitter queries
(cherry picked from commit 07eb4263ca)
2022-11-13 10:05:50 +00:00
Thomas Vigouroux
7a49cf4da9 feat(extmarks): allow preventing spellchecking with spell = false
(cherry picked from commit 7e6d785d19)
2022-11-13 10:05:50 +00:00
bfredl
1b359d4034 fix(ui): fix some cases of stale highlight definitions
fixes #20695

(cherry picked from commit d7e7578ada)
2022-11-13 09:54:34 +00:00
github-actions[bot]
81781810e6
[Backport release-0.8] docs(treesitter): fix predicate syntax (#21019)
docs(treesitter): fix predicate syntax

(cherry picked from commit 69b1bc72e0)

Co-authored-by: James Trew <j.trew10@gmail.com>
2022-11-10 09:51:11 +01:00
github-actions[bot]
8e28d8a370
[Backport release-0.8] fix(tutor): fix problem of failing to get buf name (#20985)
fix(tutor): fix problem of failing to get buf name

Closes https://github.com/neovim/neovim/issues/20920

(cherry picked from commit 86f2863e8f)

Co-authored-by: erw7 <erw7.github@gmail.com>
2022-11-06 19:23:34 -08:00
zeertzjq
a35efe1e4f
Merge pull request #20983 from neovim/backport-20952-to-release-0.8
[Backport release-0.8] fix(stdpath): default to /tmp if stdpath('run') cannot be created
2022-11-07 09:19:42 +08:00
zeertzjq
ca9b5687f6 fix(stdpath): default to /tmp if stdpath('run') cannot be created
(cherry picked from commit 8b30d7ab4c)
2022-11-07 01:09:00 +00:00
zeertzjq
b0cb9a8ad0
Merge pull request #20960 from neovim/backport-20959-to-release-0.8
[Backport release-0.8] fix(paste): feed keys as typed in cmdline mode
2022-11-06 12:55:30 +08:00
zeertzjq
95e1978959 fix(paste): feed keys as typed in cmdline mode
(cherry picked from commit c12add7dfa)
2022-11-06 04:43:38 +00:00
zeertzjq
2255d0fb63
Merge pull request #20915 from neovim/backport-20914-to-release-0.8
[Backport release-0.8] fix(man.lua): set modifiable before writing page
2022-11-03 09:18:01 +08:00
kevinhwang91
eefa7fbbc2 fix(man.lua): set modifiable before writing page
(cherry picked from commit 4282c8b41d)
2022-11-03 01:14:07 +00:00
zeertzjq
bd4269c6a6
Merge pull request #20872 from neovim/backport-20868-to-release-0.8
[Backport release-0.8] fix(health): correct tmux rgb verification
2022-10-30 08:06:12 +08:00
Barrett Ruth
2c374e626a fix(health): correct tmux rgb verification
(cherry picked from commit 4dbbeb0749)
2022-10-29 23:38:20 +00:00
zeertzjq
6a2dcaf6ab
Merge pull request #20871 from neovim/backport-20861-to-release-0.8
[Backport release-0.8] fix(mouse): ensure no scrolling with "ver:0" in 'mousescroll'
2022-10-30 07:24:10 +08:00
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