Commit Graph

29392 Commits

Author SHA1 Message Date
zeertzjq 245745f9f0 vim-patch:556c62165963
ftplugin(gdb): add matchit support

closes: vim/vim#14462

556c621659

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-11 18:22:32 +08:00
zeertzjq 1746b9234c
vim-patch:6ce07edd600e (#28275)
runtime(compiler): fix inaccuracies in pandoc compiler (vim/vim#14467)

as kindly pointed out by @Freed-Wu

6ce07edd60

Co-authored-by: Enno <Konfekt@users.noreply.github.com>
2024-04-11 17:59:29 +08:00
zeertzjq 7aa56370f3
vim-patch:9.0.2114: overflow detection not accurate when adding digits (#28271)
Problem:  overflow detection not accurate when adding digits
Solution: Use a helper function

Use a helper function to better detect overflows before adding integer
digits to a long or an integer variable respectively. Signal the
overflow to the caller function.

closes: vim/vim#13539

22cbc8a4e1

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-04-11 09:34:43 +08:00
zeertzjq 4528a69c87
test: remove unnecessary nil argument to testutil (#28270) 2024-04-11 08:51:06 +08:00
zeertzjq 509c053161
test: fix off-by-one test IDs in logs (#28269)
Run the global before_each() before all other before_each(), so that
clear() uses the test ID of the current test, not the previous one.

Don't skip generating test IDs for skipped tests, as that'll make a
skipped test have the same test ID as the previous one.
2024-04-11 07:51:25 +08:00
zeertzjq d627497156
vim-patch:04e5363b8238 (#28268)
runtime(vim): Improve Vim9 and legacy-script comment highlighting (vim/vim#13104)

This is a first-pass attempt to limit matching of Vim9 and legacy-script
comments to the appropriate syntactic contexts.

Vim9-script comments are highlighted at top level in a Vim9-script file,
in all :def functions, and in all :autocmd and :commmand command blocks.
Legacy-script comments are highlighted at top level in a legacy script
file, in all :func functions and in the Vim9-script preamble before the
:vim9script marker command.

Fixes vim/vim#13047, vim/vim#11307 and vim/vim#9587.

04e5363b82

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-04-11 07:41:44 +08:00
zeertzjq d0afb2dc4e
vim-patch:9.1.0297: Patch 9.1.0296 causes too many issues (#28263)
Problem:  Patch 9.1.0296 causes too many issues
          (Tony Mechelynck, chdiza, CI)
Solution: Back out the change for now

Revert "patch 9.1.0296: regexp: engines do not handle case-folding well"

This reverts commit 7a27c108e0509f3255ebdcb6558e896c223e4d23 it causes
issues with syntax highlighting and breaks the FreeBSD and MacOS CI. It
needs more work.

fixes: vim/vim#14487

c97f4d61cd

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-04-11 07:40:16 +08:00
zeertzjq adb70a351d
vim-patch:c9ec20d94ea5 (#28267)
runtime(doc): Update documentation

- Add security e-mail for private bugreports
- Remove mentioning of the voting feature

closes: vim/vim#14483

c9ec20d94e

Co-authored-by: RestorerZ <restorer@mail2k.ru>
Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-04-11 07:39:29 +08:00
zeertzjq f504e799a3
vim-patch:9.1.0301: Vim9: heredoc start may be recognized in string (#28266)
Problem:  Vim9: heredoc start may be recognized in string.
Solution: Don't skip to closing bracket for invalid list assignment.
          (zeertzjq)

closes: vim/vim#14472

1817ccdb10
2024-04-11 07:39:10 +08:00
luukvbaal 85099e989b
vim-patch:9.1.0300: Missing test for what patch v9.1.0285 fixes
Problem:  Missing test for what patch v9.1.0285 fixes
Solution: Add a test for cursor movement at buffer boundaries.
          (Luuk van Baal)

aa8e22b035

vim-patch:9.1.0225: test_matchparen not run in CI

Problem:  test_matchparen not run in CI
Solution: add test_matchparen.res to NEW_TESTS_RES in Makefile,
          update changed highlighting dump from v9.1.61

059aeac2be

Changes N/A and test result was restored in patch 9.1.0258 (included in #28160).
2024-04-11 07:37:49 +08:00
altermo 00e6651880 fix(treesitter): use tree range instead of tree root node range 2024-04-10 15:54:52 +01:00
Lewis Russell 81fc27124b refactor(test): inject after_each differently 2024-04-10 15:53:50 +01:00
Jaehwang Jung 889f81c65f
fix(drawline): don't invoke on_line for filler line (#28219)
Problem:
Decoration provider `on_line` handler is invoked for diff filler line
below the last buffer line. This does not match the documentation:
"called for each buffer line".

Solution:
Check `end_fill`.
2024-04-10 20:18:14 +08:00
Yi Ming 1dacf2ecee
fix(lsp): prevent code-lens refresh from becoming a permanent no-op (#28228)
To avoid repeatedly requesting a buffer multiple times before a request is completed, the current implementation puts the requested buffer into the active_refreshes table before requesting.

But since we only remove the buffer from active_refreshes in the lsp-handler of textDocument/codeLens, this will cause if the user sends a request that cannot trigger lsp-handler (for example, if there is an LSP server attached to the current buffer, and especially when the user creates an autocmd which performs vim.lsp.codelens.refresh after the BufEnter event is triggered like in the document example), this buffer will be put into active_refreshes, and there is no way to remove it, which will result in all subsequent vim.lsp.codelens.refresh not requesting textDocument/codeLens.
2024-04-10 12:27:37 +02:00
Yi Ming b95b6ed975
fix(lsp): empty commands should not be considered executable (#28216)
According to the LSP specification, the CodeLens.command is optional but the CodeLens.command.command is not optional, which means the correct representation of a display-only code lens is indeed one with a command with a title to display and an empty string as command.
2024-04-10 12:23:47 +02:00
glepnir 898371fc9f fix(float): don't relative flaot win itself
Problem: when reconfig current float win without win key in nvim_win_set_config will cause float win position changed when move.

Solution: don't relative itself.
2024-04-10 15:10:37 +08:00
zeertzjq 49983387ff
fix(prompt): emit change event for prompt newline (#28260)
Co-authored-by: Ilia Choly <ilia.choly@gmail.com>
2024-04-10 08:50:36 +08:00
zeertzjq f49408454d
vim-patch:9.1.0296: regexp: engines do not handle case-folding well (#28259)
Problem:  Regex engines do not handle case-folding well
Solution: Correctly calculate byte length of characters to skip

When the regexp engine compares two utf-8 codepoints case insensitively
it may match an adjacent character, because it assumes it can step over
as many bytes as the pattern contains.

This however is not necessarily true because of case-folding, a
multi-byte UTF-8 character can be considered equal to some single-byte
value.

Let's consider the pattern 'ſ' and the string 's'. When comparing and
ignoring case, the single character 's' matches, and since it matches
Vim will try to step over the match (by the amount of bytes of the
pattern), assuming that since it matches, the length of both strings is
the same.

However in that case, it should only step over the single byte
value 's' so by 1 byte and try to start matching after it again. So for the
backtracking engine we need to ensure:
- we try to match the correct length for the pattern and the text
- in case of a match, we step over it correctly

The same thing can happen for the NFA engine, when skipping to the next
character to test for a match. We are skipping over the regstart
pointer, however we do not consider the case that because of
case-folding we may need to adjust the number of bytes to skip over. So
this needs to be adjusted in find_match_text() as well.

A related issue turned out, when prog->match_text is actually empty. In
that case we should try to find the next match and skip this condition.

fixes: vim/vim#14294
closes: vim/vim#14433

7a27c108e0

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-04-10 07:08:49 +08:00
zeertzjq 7142c5dde9
vim-patch:e43ace558aee (#28258)
runtime(vim): Update base-syntax, no curly-brace names in Vim9 script (vim/vim#14466)

Remove curly-brace name matching for :def functions.  This is not
supported in Vim9 script.

e43ace558a

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-04-10 06:31:10 +08:00
zeertzjq efb6640b29
vim-patch:9.1.0287: Vim9: comment may be treated as heredoc start (#28257)
Problem:  Vim9: comment may be treated as heredoc start.
          (Ernie Rael)
Solution: Use skip_var_list() instead of find_name_end().
          (zeertzjq)

fixes: vim/vim#14444
closes: vim/vim#14446

9a91d2b72c
2024-04-10 06:07:29 +08:00
zeertzjq f398552eb1
Merge pull request #28256 from luukvbaal/vim-9.1.0285
vim-patch:9.1.{0285,0294}
2024-04-10 06:07:04 +08:00
Luuk van Baal d4956e16d9 vim-patch:9.1.0294: Text height function does not respect it's argument
Problem:  plines_m_win() does not take into account it's "limit_winheight"
          argument for filler lines below the last line of the buffer.
          (after v9.1.0280)
Solution: Check window height when "limit_winheight" is TRUE.
          (Luuk van Baal)

08b0f632c1
2024-04-09 23:43:42 +02:00
Luuk van Baal 832857ae09 vim-patch:9.1.0285: Still problems with cursor position for CTRL-D/U
Problem:  Problems with cursor position when scrolling half a page.
Solution: Rework the cursor logic. (Luuk van Baal)

78c51500f1
2024-04-09 21:44:42 +02:00
zeertzjq 4946489e2e
vim-patch:9.1.0283: Several small issues in doc and tests (#28249)
Problem:  Wrong doc style for pandoc syntax description,
          Test_diff_eob_halfpage() may fail depending on
          screen size, using braces in highlight.c when
          not necessary
Solution: Fix pandoc documentation, make sure the window
          for the test has 7 lines, remove the braces.

a040019be6

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-04-09 16:42:39 +08:00
Christian Clason 102720be94 vim-patch:9.1.0281: CI: fails Test_compiler_completion
Problem:  CI: fails Test_compiler_completion
Solution: Add pandoc compiler

d33cb3f65e

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-04-09 10:24:49 +02:00
Christian Clason 41521658b1 vim-patch:9.1.0276: No pandoc syntax support
Problem:  No pandoc syntax support
Solution: Add pandoc syntax and compiler plugins
          (Wu, Zhenyu, Konfekt)

closes: vim/vim#14389

7005b7ee7f

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2024-04-09 10:24:49 +02:00
Sam 168e69ae01
fix(tui): don't set cursor color when there is none (#28236) 2024-04-09 16:05:15 +08:00
Christian Clason 4a1eec85dd vim-patch:a2385c233499
runtime(cuda): Update cuda keywords, remove uncommonly used enumeration constants

closes: vim/vim#14406

a2385c2334

Co-authored-by: jiangyinzuo <jiangyinzuo@foxmail.com>
2024-04-09 09:54:16 +02:00
Christian Clason cbe982bbd5 vim-patch:9.1.0278: filetype: zathurarc files not recognized
Problem:  filetype: zathurarc files not recognized
Solution: Detect '.zathurarc' files as zathurarc filetype,
          add zathurarc filetype (Wu, Zhenyu)

closes: vim/vim#14380

72d81a66ed

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-09 09:54:07 +02:00
Christian Clason 2857cde070 vim-patch:9.1.0275: filetype: R history files are not recognized
Problem:  filetype: R history files are not recognized
Solution: Detect '.Rhistory' files as r filetype
          (Wu, Zhenyu)

closes: vim/vim#14440

fc21b6437c

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-09 09:53:58 +02:00
Christian Clason bef4ad6507 vim-patch:9.1.0279: filetype: roc files are not recognized
Problem:  filetype: roc files are not recognized
Solution: Detect '*.roc' files as roc filetype,
          add a basic filetype plugin (nat-418)

closes: vim/vim#14416

196b6678c5

Co-authored-by: nat-418 <93013864+nat-418@users.noreply.github.com>
2024-04-09 09:53:49 +02:00
bfredl a663eb10bd
Merge pull request #28230 from bfredl/hl_cleanup_3
fix(tests): use more global highlight definitions
2024-04-09 09:41:35 +02:00
bfredl 3d44340cea fix(tests): use more global highlight definitions 2024-04-09 09:09:41 +02:00
zeertzjq c695caa7ee
vim-patch:8.2.4395: some code lines not covered by tests (#28248)
Problem:    Some code lines not covered by tests.
Solution:   Add a few more test cases.  Fix getting more than one error for
            invalid assignment.

8b716f5f22

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-04-09 11:06:02 +08:00
zeertzjq 869d303043
vim-patch:8.2.0981: Vim9: cannot compile "[var, var] = list" (#28247)
Problem:    Vim9: cannot compile "[var, var] = list".
Solution:   Implement list assignment.

47a519a933

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-04-09 10:10:47 +08:00
zeertzjq 6d1e41432d
test(terminal/buffer_spec): use screen:expect(), not retry() (#28246)
Without creating new lines, using screen:expect() is faster and avoids
RPC requests.
2024-04-09 09:32:27 +08:00
zeertzjq 56123fb271
test(terminal/buffer_spec): avoid other keys in double clicks (#28245)
Having unrelated keys between double clicks may make the test flaky as
'mousetime' is more easily reached.
2024-04-09 08:51:14 +08:00
zeertzjq 2528093bbe
vim-patch:9.1.0277: Cannot highlight the Command-line (#28244)
Problem:  Cannot highlight the Command-line
Solution: Add the MsgArea highlighting group
          (Shougo Matsushita)

closes: vim/vim#14327

be2b03c6ee

Cherry-pick Test_highlight_User() from patch 8.2.1077.

Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
2024-04-09 07:20:49 +08:00
zeertzjq 66e86d3095
Merge pull request #28160 from luukvbaal/vim-9.1.0258
vim-patch:9.1.{0258,0260,0280}
2024-04-09 07:08:52 +08:00
Luuk van Baal 8f5fd0884b vim-patch:9.1.0280: several issues with 'smoothscroll' support
Problem:  Logic to make sure cursor is in visible part of the screen after
          scrolling the text with 'smoothscroll' is scattered, asymmetric
          and contains bugs.
Solution: Adjust and create helper function for 'smoothscroll' cursor logic.
          (Luuk van Baal)

9148ba8a46
2024-04-09 00:51:06 +02:00
Luuk van Baal e21423bb35 vim-patch:9.1.0260: Problems with "zb" and scrolling to new topline with 'smoothscroll'
Problem: "zb" does not reveal filler lines at the start of a buffer.
          Scrolled cursor position with 'smoothscroll' is unpredictable,
          and may reset skipcol later if it is not visible (after v9.1.258)
Solution: Replace confusing for loop that reaches final control value too
          early with while loop. Set "w_curswant" accordingly so cursor
          will be placed in visible part of topline.
          (Luuk van Baal)

bd28cae1f1
2024-04-08 23:15:43 +02:00
Luuk van Baal e6cfa22c4c vim-patch:9.1.0258: half-page scrolling broke backward compatibility
Problem:  Support for 'smoothscroll' in (half-)page scrolling
          broke backward compatibility and can be made to work better.
          (after v9.1.215)
Solution: Restore the previous cursor and end-of-buffer behavior for
          half-page scrolling and improve 'smoothscroll' support.
          (Luuk van Baal)

cb204e688e
2024-04-08 23:15:43 +02:00
dundargoc 7035125b2b test: improve test conventions
Work on https://github.com/neovim/neovim/issues/27004.
2024-04-08 22:51:00 +02:00
zeertzjq 978962f9a0
build(release.sh): regenerate docs after changing NVIM_API_PRERELEASE (#28229)
After #25574, the value of NVIM_API_PRERELEASE can affect docs, so docs
need to be regenerated after changing NVIM_API_PRERELEASE.
2024-04-08 17:46:41 +08:00
dundargoc 624de849de build: add function add_target
It's a combination of add_custom_target and add_custom_command that does
what most users probably expect should happen.

This also fixes `make clean` removing files tracked by git.
2024-04-08 10:52:53 +02:00
zeertzjq be2a4b52b9
docs(BUILD): mention treesitter parser dependencies (#28226)
Also add missing mention of libvterm and remove mention of libtermkey.
2024-04-08 16:04:54 +08:00
Christian Clason 541c2d3816 vim-patch:9.1.0273: filetype: keymap files are not recognized
Problem:  filetype: keymap files are not recognized
Solution: Detect '*.keymap' files as Device Tree Files
          (0xadk)

closes: vim/vim#14434

b78753db5f

Co-authored-by: 0xadk <0xadk@users.noreply.github.com>
2024-04-08 00:35:38 +02:00
zeertzjq d188b929d4
vim-patch:9.1.0272: autocmd may change cwd after :tcd and :lcd (#28223)
Problem:  Autocommand may change currect directory after :tcd and :lcd.
Solution: Also clear tp_localdir and w_localdir when using aucmd_win.
          (zeertzjq)

closes: vim/vim#14435

9d956ee8ea
2024-04-08 06:25:22 +08:00
zeertzjq d32cbef595
vim-patch:9cd9e759ab1e (#28224)
runtime(doc): Normalise builtin-function optional parameter formatting

These should generally be formatted as func([{arg}]) and referenced as
{arg} in the description.

closes: vim/vim#14438

9cd9e759ab

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2024-04-08 06:11:31 +08:00
bfredl 067f51e3aa
Merge pull request #28183 from bfredl/intechnicolor
refactor(tests): use more standard colors but with extra colors
2024-04-07 11:49:13 +02:00