Commit Graph

23400 Commits

Author SHA1 Message Date
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
Justin M. Keyes
ef4c339fb9
feat(docs): update parser, HTML gen #20720
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
2022-10-18 07:18:44 -07:00
zeertzjq
4d896be681
vim-patch:9.0.0786: user command does not get number from :tab modifier (#20716)
Problem:    User command does not get number from :tab modifier.
Solution:   Include the number. (closes vim/vim#11393, closes vim/vim#6901)
208567e9d7
2022-10-18 20:46:42 +08:00
zeertzjq
97164748b9
fix(intro): omit patch version in ":help news" item #20713
Because maintenance releases share the same news.txt as the last
non-maintenance release.
2022-10-18 03:42:32 -07:00
dundargoc
72b2353ab2
ci: add reviewers based on labels (#20703) 2022-10-18 11:13:58 +02:00
Mahmoud Al-Qudsi
bd7ca10fdd
fix(qflist): avoid read of uninitialized memory (#20709)
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.
2022-10-18 10:15:24 +08:00
dundargoc
be43cf16cc
ci: bump ubuntu and macos to latest stable versions (#20479) 2022-10-17 19:40:54 +02:00
Christian Clason
e427313545
vim-patch:9.0.0782: OpenVPN files are not recognized (#20702)
Problem:    OpenVPN files are not recognized.
Solution:   Add patterns for OpenVPN files. (closes vim/vim#11391)
4bf67ec52e
2022-10-17 18:36:10 +02:00
dundargoc
5046b4b4ad
ci: add cirrus to isCI function to skip tests (#20526)
The environment variable CIRRUS_CI is manually passed to RunTests.cmake
as it doesn't get passed when using cmake script mode.
2022-10-17 17:16:31 +02:00
C.D. MacEachern
b9632e58e3
fix(runtime): use g:terminal_color_{0-15} in colorschemes (#20637) 2022-10-17 15:24:37 +01:00
zeertzjq
8ebf234533
Merge pull request #20685 from luukvbaal/scroll
fix: 'scroll' is not set correctly for floats with 'splitkeep'
2022-10-17 22:04:26 +08:00
zeertzjq
14a84ec169 test: add a test for #20684 2022-10-17 21:39:49 +08:00
Luuk van Baal
46eabe1ac1 fix: 'scroll' is not set correctly for floats with 'splitkeep'
vim-patch:9.0.0780: 'scroll' value computed in unexpected location

Problem:    'scroll' value computed in unexpected location.
Solution:   Compute 'scroll' when the window height is changed. (Luuk van
            Baal, closes vim/vim#11387)
a1a46da87d
2022-10-17 21:28:30 +08:00
zeertzjq
637ab296cb
feat(api): nvim_select_popupmenu_item support cmdline pum (#20652) 2022-10-17 21:00:50 +08:00
Mahmoud Al-Qudsi
39911d76be
fix(man): handle absolute paths as :Man targets (#20624)
* fix(man): handle absolute paths as :Man targets

Previously, attempting to provide `:Man` with an absolute path as the name would
cause neovim to return the following error:

```
Error detected while processing command line:
/usr/local/share/nvim/runtime/lua/man.lua:690: /usr/local/share/nvim/runtime/lua/man.lua:683: Vim:E426: tag not found: nil(nil)
Press ENTER or type command to continue
```

..because it would try to validate the existence of a man page for the provided
name by executing `man -w /some/path` which (on at least some Linux machines
[0]) returns `/some/path` instead of the path to the nroff files that would be
formatted to satisfy the man(1) lookup.

While man pages are not normally named after absolute paths, users shouldn't be
blamed for trying. Given such a name/path, neovim would **not** complain that
the path didn't have a corresponding man file but would error out when trying
to call the tag function for the null-propagated name-and-section `nil(nil)`.
(The same underlying error existed before this function was ported to lua, but
did not exhibit the lua-specific `nil(nil)` name; instead a tag lookup for `()`
would fail and error out.)

With this patch, we detect the case where `man -w ...` returns the same value as
the provided name to not only prevent invoking the tag function for a
non-existent/malformed name+sect but also to properly report the non-existence
of a man page for the provided lookup (the absolute path).

While man(1) can be used to directly read an nroff-formatted document via `man
/path/to/nroff.doc`, `:Man /path/to/nroff.doc` never supported this behavior so
no functionality is lost in case the provided path _was_ an nroff file.

[0]: `man -w /absolute/path` returning `/absolute/path` observed on an Ubuntu
18.04 installation.

* test: add regression test for #20624

Add a functional test to `man_spec.lua` to check for a regression for #20624 by
first obtaining an absolute path to a random file and materializing it to disk,
then attempting to query `:Man` for an entry by that same name/path.

The test passes if nvim correctly reports that there is no man page
correspending to the provided name/path and fails if any other error (or no
error) is shown.
2022-10-17 10:37:44 +01:00
Lewis Russell
190019dd79
Merge pull request #20665 from lewis6991/fix/decor_redraw 2022-10-17 10:19:26 +01:00
Christian Clason
042eb74ff1
feat(runtime)!: remove filetype.vim (#20428)
Made obsolete by now graduated `filetype.lua` (enabled by default).

Note that changes or additions to the filetype detection still need to
be made through a PR to vim/vim as we port the _logic_ as well as tests.
2022-10-17 08:52:40 +02:00
Christian Clason
9701c9dc9f
vim-patch:3c053a1a5ad2 (#20679)
Update runtime files
3c053a1a5a
2022-10-17 08:19:48 +02:00
Jonas Strittmatter
d44f088834
vim-patch:9.0.0771: cannot always tell the difference beween tex and … (#20687)
vim-patch:9.0.0771: cannot always tell the difference beween tex and rexx files

Problem:    Cannot always tell the difference beween tex and rexx files.
Solution:   Recognize tex by a leading backslash. (Martin Tournoij,
            closes vim/vim#11380)
bd053f894b
2022-10-17 08:18:57 +02:00
dundargoc
8617101b6b
docs: "supported platforms" matrix #19615
Inspired by libuv's own SUPPORTED_PLATFORMS.md:
https://github.com/libuv/libuv/blob/v1.x/

https://neovim.io/doc/user/support.html
2022-10-16 15:31:51 -07:00
David Hotham
8f31a730c0
fix(lsp): reporting bogus capabilities in CodeActionKind #20678
Problem:
LSP client provides bogus capabilities in CodeActionKind.
LSP logs show this in the "initialize" message:
    codeActionKind = { valueSet = { "Empty", "QuickFix",
    "Refactor", "RefactorExtract", "RefactorInline", "RefactorRewrite",
    "Source", "SourceOrganizeImports", "", "quickfix", "refactor",
    "refactor.extract", "refactor.inline", "refactor.rewrite", "source",
    "source.organizeImports" }

Solution:
Only the values from the CodeActionKind table should be presented, not also the
keys.

fix #20657
2022-10-16 15:24:39 -07:00
Gregory Anders
935e1ca743
feat: mention ":help news" in intro #20674 2022-10-16 14:55:18 -07:00
zeertzjq
0b71960ab1
Merge pull request #20677 from zeertzjq/vim-9.0.0761
vim-patch:9.0.{0761,0762,0764}: 'lispoptions'
2022-10-16 08:56:26 +08:00
zeertzjq
c8fbf39d47 vim-patch:9.0.0764: indent and option tests fail
Problem:    Indent and option tests fail.
Solution:   Change OP_INDENT.  Add entry to options test table.
c8b6735573
2022-10-16 08:34:55 +08:00
zeertzjq
19eb7054ff vim-patch:9.0.0761: cannot use 'indentexpr' for Lisp indenting
Problem:    Cannot use 'indentexpr' for Lisp indenting.
Solution:   Add the 'lispoptions' option.
49846fb1a3

vim-patch:9.0.0762: build failure

Problem:    Build failure.
Solution:   Add missing change.
4b082c4bd0
2022-10-16 08:34:55 +08:00
zeertzjq
bc798dfd8c
vim-patch:9.0.0765: with a Visual block a put command column may go negative (#20676)
Problem:    With a Visual block a put command column may go negative.
Solution:   Check that the column does not become negative.
36343ae0fb
2022-10-16 08:01:44 +08:00
Lewis Russell
2921de6a96 fix(decoration): call providers in win_update() earlier
Fixes #20651
2022-10-15 18:06:59 +01:00
Lewis Russell
80161ec7d6
refactor(drawscreen.c): reduce scopes of locals (#20668) 2022-10-15 18:01:52 +01:00
bfredl
d4841e24da
Merge pull request #20140 from dundargoc/refactor/char_u/12
refactor: replace char_u with char 12: remove `STRLEN` part 2
2022-10-15 18:17:07 +02:00
zeertzjq
0434f732a6
Merge pull request #20670 from zeertzjq/vim-9.0.0737
vim-patch:9.0.{partial:0737,0754}: lisp indent fixes
2022-10-15 20:27:34 +08:00
Lewis Russell
1ba9d63d77
refactor(shada.c): clint (#20599) 2022-10-15 12:45:57 +01:00
zeertzjq
32ced1f08f vim-patch:9.0.0754: 'indentexpr' overrules lisp indenting in one situation
Problem:    'indentexpr' overrules lisp indenting in one situation.
Solution:   Add "else" to keep the lisp indent. (issue vim/vim#11327)
a79b35b578
2022-10-15 19:44:03 +08:00
zeertzjq
eaac095825 vim-patch:partial:9.0.0737: Lisp word only recognized when a space follows
Problem:    Lisp word only recognized when a space follows.
Solution:   Also match a word at the end of a line.  Rename the test.  Use a
            compiled function to avoid backslashes.
d26c5805bc

Keep the old Test_lisp_indent().
2022-10-15 19:42:03 +08:00
Dundar Göc
04cdea5f4a refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
2022-10-15 13:18:46 +02:00
zeertzjq
433818351b
Merge pull request #20663 from zeertzjq/vim-9.0.0753
vim-patch:partial:{3e79c97c18c5,9da17d7c5707,9.0.0753}
2022-10-15 19:07:30 +08:00
Justin M. Keyes
d52e3b97c5
Merge #20634 fix(windows): set console icon later in startup 2022-10-15 06:22:47 -04:00
kylo252
9cb2a69039
docs(dev-style): remove rule about variable declarations (#20446)
The other style rules such as "initialize variables in the declaration" should already take care of this rule automatically.
2022-10-15 11:55:55 +02:00
zeertzjq
09b0f7cd08 vim-patch:partial:9.0.0753: some Ex commands are not in the help index
Problem:    Some Ex commands are not in the help index.
Solution:   Add the missing commands.  Add a script to check all Ex commands
            are in the help index. (Yee Cheng Chin, closes vim/vim#11371)
b77bdce120

Only port index.txt docs for :star and :horizontal.
2022-10-15 17:44:56 +08:00
zeertzjq
6f5426edf6 vim-patch:partial:9da17d7c5707
Update runtime files
9da17d7c57

Only port index.txt, syntax.txt and uganda.txt.
2022-10-15 17:42:45 +08:00
zeertzjq
3e5e12482c vim-patch:partial:3e79c97c18c5
Update runtime files; use compiled functions
3e79c97c18

Only port uganda.txt.
2022-10-15 17:39:32 +08:00
zeertzjq
9d05b28f75
Merge pull request #20662 from zeertzjq/vim-9.0.0614
vim-patch:8.1.0342,9.0.{0614,0616}: SpellFileMissing autocmd may delete buffer
2022-10-15 16:52:25 +08:00
zeertzjq
a9452cf3d5 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
2022-10-15 16:28:36 +08:00
zeertzjq
6bc2d6b66b 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
2022-10-15 16:28:36 +08:00
zeertzjq
65cbe0cc35 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.
2022-10-15 16:28:31 +08:00
Christian Clason
e26b48bde6
vim-patch:9.0.0752: Rprofile files are not recognized (#20658)
Problem:    Rprofile files are not recognized.
Solution:   Recognize Rprofile files as "r". (closes vim/vim#11369)
7e120ffccb
2022-10-15 10:12:25 +02:00
zeertzjq
1c478391ca
vim-patch:9.0.0750: crash when popup closed in callback (#20659)
Problem:    Crash when popup closed in callback. (Maxim Kim)
Solution:   In syntax_end_parsing() check that syn_block is valid.
0abd6cf62d
2022-10-15 07:24:03 +08:00
Lewis Russell
cb7da02701
Merge pull request #20645 from lewis6991/fix/decor_redraw_same_id
fix(decoration): redraw correctly when re-using ids
2022-10-14 20:46:26 +01:00
Justin M. Keyes
1ca3a3749f refactor(windows): move os_icon_xx functions 2022-10-14 17:17:35 +02:00
Justin M. Keyes
ffc6d14af5 fix(windows): set console icon later in startup
Problem:
Windows console icon is set early in startup, but there are some cases
where `os_exit` is called and we don't restore the original icon.

Solution:
- Move `os_icon_init()` later in the startup sequence, and only if
  `use_builtin_ui==true`.
- Rename functions: use `os_` prefix for platform-specific code.
2022-10-14 17:13:38 +02:00