Commit Graph

24038 Commits

Author SHA1 Message Date
Mathias Fussenegger
67e1390dc8 fix(lsp): call show_document with correct args
Closes https://github.com/neovim/neovim/issues/21177
2022-12-04 15:57:46 +01:00
Mathias Fussenegger
48b84d6d6e refactor(lsp): extract a _create_server method in lsp_spec 2022-12-04 15:39:22 +01:00
Raphael
01a8cd0432
fix(lsp): remove workspaceFolders field (#21284) 2022-12-04 14:56:04 +01:00
zeertzjq
b866d8d2e7
vim-patch:9.0.0610: global interrupt test fails when run under valgrind (#21285)
Problem:    Global interrupt test fails when run under valgrind.
Solution:   Use TermWait().

859ea4bc76

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-04 18:33:04 +08:00
zeertzjq
9263f17d0d
vim-patch:9.0.0259: crash with mouse click when not initialized (#21282)
Problem:    Crash with mouse click when not initialized.
Solution:   Check TabPageIdxs[] is not NULL.

80525751c5

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-04 17:44:51 +08:00
zeertzjq
823247a040
Merge pull request #21281 from zeertzjq/vim-8.2.4163
vim-patch:8.2.{4163,4168}
2022-12-04 16:59:45 +08:00
zeertzjq
d93b906254 vim-patch:8.2.4168: disallowing empty function name breaks existing plugins
Problem:    Disallowing empty function name breaks existing plugins.
Solution:   Allow empty function name in legacy script.

e6a4200ff4

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-04 16:34:01 +08:00
zeertzjq
32810c0818 vim-patch:8.2.4163: no error for omitting function name after autoload prefix
Problem:    No error for omitting function name after autoload prefix.
Solution:   Check for missing function name. (issue vim/vim#9577)

2017d6f3b1

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-04 16:29:26 +08:00
zeertzjq
a0dd663c2d
Merge pull request #21279 from zeertzjq/vim-8.2.2182
vim-patch:8.2.{2182,2295,3265,3292}: search fixes
2022-12-04 10:32:20 +08:00
zeertzjq
9476dd2f92 vim-patch:8.2.3292: underscore in very magic pattern causes a hang
Problem:    Underscore in very magic pattern causes a hang.  Pattern with \V
            are case sensitive. (Yutao Yuan)
Solution:   Adjust condition for magicness and advance pointer. (Christian
            Brabandt, closes vim/vim#8707, closes vim/vim#8704, closes vim/vim#8705)

bc67e5a0a4

Co-authored-by: Christian Brabandt <cb@256bit.org>
2022-12-04 10:07:05 +08:00
zeertzjq
3f1ee12d31 vim-patch:8.2.3265: smartcase does not work correctly in very magic pattern
Problem:    Smartcase does not work correctly in very magic pattern.
Solution:   Take the magicness into account when skipping over regexp items.
            (Christian Brabandt, closes vim/vim#8682, closes vim/vim#7845)

78ba933d18

Co-authored-by: Christian Brabandt <cb@256bit.org>
2022-12-04 10:07:05 +08:00
zeertzjq
46e4be0fd0 vim-patch:8.2.2295: incsearch does not detect empty pattern properly
Problem:    Incsearch does not detect empty pattern properly.
Solution:   Return magic state when skipping over a pattern. (Christian
            Brabandt, closes vim/vim#7612, closes vim/vim#6420)

d93a7fc1a9
2022-12-04 10:07:05 +08:00
zeertzjq
a91ba088ab vim-patch:8.2.2182: Vim9: value of 'magic' is still relevant
Problem:    Vim9: value of 'magic' is still relevant.
Solution:   Always behave like 'magic' is on in Vim9 script (closes vim/vim#7509)

f4e2099e39

EX_NONWHITE_OK is N/A: only applies to Vim9 script.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-04 10:07:04 +08:00
Christian Clason
fba0562723
fix(syntax): correct conceal for annotated code blocks (#21272)
fixup for https://github.com/neovim/neovim/pull/21154
2022-12-03 15:16:37 +01:00
zeertzjq
e642825e28
Merge pull request #21274 from zeertzjq/vim-8.2.3992
vim-patch:8.2.{3992,4261,4262},9.0.{0110,0577}
2022-12-03 21:44:13 +08:00
zeertzjq
0cb90114d4 vim-patch:9.0.0577: buffer underflow with unexpected :finally
Problem:    Buffer underflow with unexpected :finally.
Solution:   Check CSF_TRY can be found.

96b9bf8f74

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-03 21:21:47 +08:00
zeertzjq
bf4bf7f9e0 vim-patch:9.0.0110: help tag generation picks up words in code examples
Problem:    Help tag generation picks up words in code examples.
Solution:   Skip over examples. (Carlo Teubner, closes vim/vim#10813)

ddab3ce345

Also fix mistakes in help files.

Co-authored-by: Carlo Teubner <carlo@cteubner.net>
2022-12-03 21:21:47 +08:00
zeertzjq
3838ee63d0 test(old): skip Vim9 script with less divergence 2022-12-03 21:21:47 +08:00
zeertzjq
742d95a629 vim-patch:8.2.4262: some search tests fail
Problem:    Some search tests fail.
Solution:   Use a better way to reject searching for the Visual area.

44a4d947bb

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-03 21:21:47 +08:00
zeertzjq
f6caa35e65 vim-patch:8.2.4261: accessing invalid memory in a regular expression
Problem:    Accessing invalid memory when a regular expression checks the
            Visual area while matching in a string.
Solution:   Do not try matching the Visual area in a string.

679d66c2d2

Use CheckScriptFailure() instead of v9.CheckScriptFailure().

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-03 21:21:47 +08:00
zeertzjq
b69c581761 vim-patch:8.2.3992: wrong local-additions in the help with language mix
Problem:    Wrong local-additions in the help with language mix.
Solution:   Adjust how the local additions list is generated. (Hirohito
            Higashi, closes vim/vim#9464)

0e2508d9e6

Co-authored-by: h-east <h.east.727@gmail.com>
2022-12-03 21:21:47 +08:00
zeertzjq
e7a2ae829a test(old): make ":h local-additions" work properly in test_help.vim 2022-12-03 21:21:47 +08:00
Folke Lemaitre
c768b578fa
fix(lsp): render <pre>{lang} code blocks and set separator default to false (#21271) 2022-12-03 13:51:57 +01:00
zeertzjq
8f1ef36875
Merge pull request #21270 from zeertzjq/vim-8.2.1420
vim-patch:8.2.{1420,1440}: test 49 is old style
2022-12-03 15:09:46 +08:00
zeertzjq
7d283d2139 vim-patch:8.2.1440: debugger code insufficiently tested
Problem:    Debugger code insufficiently tested.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#6700)

16c6232cad
2022-12-03 14:47:35 +08:00
zeertzjq
8a29d9660e vim-patch:8.2.1420: test 49 is old style
Problem:    Test 49 is old style.
Solution:   Convert remaining parts to new style. Remove obsolete items.
            (Yegappan Lakshmanan, closes vim/vim#6683)

f7c4d83609
2022-12-03 14:47:35 +08:00
zeertzjq
aa49212731
vim-patch:9.0.0322: crash when no errors and 'quickfixtextfunc' is set (#21269)
Problem:    Crash when no errors and 'quickfixtextfunc' is set.
Solution:   Do not handle errors if there aren't any.

4f1b083be4

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-03 13:34:25 +08:00
zeertzjq
c0840087c8
Merge pull request #21267 from zeertzjq/vim-8.2.3900
vim-patch:8.2.{3900,partial:3908}: it is not easy to use a script-local function for an option
2022-12-03 09:05:20 +08:00
zeertzjq
5e97984188 vim-patch:partial:8.2.3908: cannot use a script-local function for 'foldtext'
Problem:    Cannot use a script-local function for 'foldtext'.
Solution:   Expand "s:" and "<SID>". (Yegappan Lakshmanan, closes vim/vim#9411)

27708e6c7b

Only port the changes actually related to 'foldtext'.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-12-03 08:39:57 +08:00
zeertzjq
9671908c68 vim-patch:8.2.3900: it is not easy to use a script-local function for an option
Problem:    It is not easy to use a script-local function for an option.
Solution:   recognize s: and <SID> at the start of the expression. (Yegappan
            Lakshmanan, closes vim/vim#9401)

8bb65f230d

Omit duplicate docs in fold.txt: removed in a later runtime update.
Cherry-pick test_diffmode.vim changes from patch 8.2.1432.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-12-03 08:35:13 +08:00
zeertzjq
2ae0d32a72 refactor: make sure getting a callback doesn't modify argument 2022-12-03 08:24:48 +08:00
zeertzjq
10c50d9f30
Merge pull request #21266 from zeertzjq/vim-8.2.3889
vim-patch:8.2.3889,9.0.{0805,0990}
2022-12-03 04:26:00 +08:00
zeertzjq
afb3ff52ec vim-patch:9.0.0990: callback name argument is changed by setqflist()
Problem:    Callback name argument is changed by setqflist().
Solution:   Use the expanded function name for the callback, do not store it
            in the argument. (closes vim/vim#11653)

c96b7f5d2a

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-03 04:05:18 +08:00
zeertzjq
1e6d5fdf3f vim-patch:9.0.0805: filetype autocmd may cause freed memory access
Problem:    Filetype autocmd may cause freed memory access.
Solution:   Set the quickfix-busy flag while filling the buffer.

d0fab10ed2

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-03 03:42:43 +08:00
zeertzjq
70ac0c9358 vim-patch:8.2.3889: duplicate code for translating script-local function name
Problem:    Duplicate code for translating script-local function name.
Solution:   Move the code to get_scriptlocal_funcname(). (Yegappan Lakshmanan,
            closes vim/vim#9393)

e7f4abd38b

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-12-03 03:39:56 +08:00
Christian Clason
07e6296520
Merge pull request #21154 from clason/vimdoc-injections
feat(help): highlighted codeblocks
2022-12-02 16:45:39 +01:00
Christian Clason
e40df8b1bc docs(news): add entry for highlighted code 2022-12-02 16:05:00 +01:00
Christian Clason
0b05bd87c0 docs(gen): support language annotation in docstrings 2022-12-02 16:05:00 +01:00
Christian Clason
9e1187e489 feat(web): syntax highlighting via highlight.js
download from https://highlightjs.org/download/
place `highlight/` directory next to `css/`

style needs adapting for Neovim colors
2022-12-02 16:05:00 +01:00
Christian Clason
952f19ba38 docs: add language annotation to Nvim manual 2022-12-02 16:05:00 +01:00
zeertzjq
7314323420
Merge pull request #21264 from zeertzjq/vim-8.2.3829
vim-patch:8.2.{3829,3838}: cannot use script-local function for setting *func options
2022-12-02 22:10:09 +08:00
zeertzjq
7d10194426 vim-patch:8.2.3838: cannot use script-local function for setting *func options
Problem:    Cannot use script-local function for setting *func options.
Solution:   Use the script context. (Yegappan Lakshmanan, closes vim/vim#9362)

db1a410b61

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-12-02 21:28:07 +08:00
zeertzjq
1aad5af637 vim-patch:8.2.3829: no error when setting a func option to script-local function
Problem:    No error when setting a func option to a script-local function.
Solution:   Give an error if the name starts with "s:". (closes vim/vim#9358)

94c785d235

Omit test: reverted in patch 8.2.3838.
Cherry-pick SCRIPT_ID_VALID from patch 8.2.1539.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-02 21:28:07 +08:00
Jan Palus
a3f01d32cb
build: restrict git describe to top level source directory (#20993)
fix version determination when building neovim from release tarball
extracted within another git repository
2022-12-02 13:45:37 +01:00
Jonathon
c95a0c9959
fix(diff): fix a crash in diff mode with linematch enabled (#21070)
Problem: With two files open side by side in diff mode and deleting all of the contents of one file, the w_topfill value, which indicates the number of filler lines at the top of the window is set to be a negative number, and it will result in the virtual_lines_passed variable also being negative, and this while loop will run when it shouldn't. While calculating where the cursor and topline should be with linematch enabled, this topfill value is used to put the cursor and top line where it should be in the other windows. If that topfill number is negative, this causes a segfault. 

Solution: Check for positive top fill.
2022-12-02 13:45:00 +01:00
zeertzjq
1145a9b248
feat(aucmd_win): allow crazy things with hidden buffers (#21250)
Problem:    Crash when doing crazy things with hidden buffers.
Solution:   Dynamically allocate the list of autocommand windows.
2022-12-02 20:39:24 +08:00
Christian Clason
805c83f43e
build(deps): bump LuaJIT to HEAD - 564147f51 (#21257) 2022-12-02 10:20:53 +01:00
zeertzjq
86f9e29c86
refactor: remove COMMA (#21260)
It is not needed in Nvim. Ref #6068
2022-12-02 13:10:30 +08:00
kylo252
dcc686a208
test: use luv.os_uname for fast platform detection (#21157) 2022-12-02 12:36:31 +08:00
zeertzjq
facfc88b4c
Merge pull request #21262 from zeertzjq/vim-8.2.1748
vim-patch:8.2.1748: closing split window in other tab may cause a crash
2022-12-02 11:15:47 +08:00