As only a few API functions make use of explicit freeing of the return
value, make it opt-in instead. The arena is always present under the
hood, so `Arena *arena` arg now doesn't mean anything other than getting
access to this arena. Also it is in principle possible to return an
allocated value while still using the arena as scratch space for other
stuff (unlikely, but there no reason to not allow it).
runtime(filetype): Modula-2 files with priority not detected (vim/vim#14055)
Problem: Modula-2 files with a specified priority are not detected.
Solution: Match the priority syntax in module header lines when
performing heuristic content detection.
Disable the :defcompile debug line. This was accidentally left enabled
in commit 68a8947.
ef387c062b
Co-authored-by: dkearns <dougkearns@gmail.com>
Help outlines, invoked by `gO`, displays the help section titles in the
location list window. This feature is implemented by setting the buffer
lines after opening the window, but this implementation breaks the
assumption that the quickfix window texts are consistently constructed
by the quickfix list items. I think we can use the conceal feature here.
Using conceal here improves interoperability between quickfix plugins,
and also simplifies the outline implementation.
Originally reported at https://github.com/itchyny/vim-qfedit/issues/12
The way ml_replace_buf is implemented makes it unfriendly for
being used in a loop: every call allocates a scratch buffer for putting
the line into the "dirty" state. This then immediately needs to be freed
as the next ml_replace_buf and/or ml_append_buf call will flush that buffer.
It's better to later pay the price of allocating the scratch buffer only if
the line is being immediately edited (likely when using the API to only
change one line) with an extra memcpy, than allocating that buffer
multiple times every time the API is called.
Of course, a separate xmalloc/xfree cycle for each time the dirty line
changes is unwanted to begin with. But fixing that is a later refactor.
Problem: Using freed memory with full tag stack and user data
(Konstantin Khlebnikov)
Solution: Clear the user data pointer of the newest entry.
(zeertzjq, Konstantin Khlebnikov)
fixes: neovim/neovim#27498closes: vim/vim#14053c86bff1771
Cherry-pick Test_tag_stack() changes from patch 9.0.0767.
Co-authored-by: Konstantin Khlebnikov <koct9i@gmail.com>
Note: kSDItemHeader is something is _written_ by nvim in the shada file
to identify it for debugging purposes outside of nvim. But this data wasn't ever used by
neovim after reading the file back, So I removed the parsing of it for now.
Splitting it on word boundaries rather than only spaces allows for better
detection. The issue labeler previously didn't catch titles such as
`treesitter: noisy "Invalid node type" error`.
Co-authored-by: casswedson <casswedson@users.noreply.github.com>
Problem: Setting some options changes curswant unnecessarily.
Solution: Add a P_HLONLY flag that prevents changing curswant.
(zeertzjq)
closes: vim/vim#14044fcaed6a70f
Run the release workflow on macos-14 to use faster M1 runners.
Lock the deployment target to the oldest supported version (11.0,
due to libuv support) instead of relying on the host OS version.
Problem: No test coverage on ARM.
Solution: Add `macos-14` tests, which now run on M1. Skip unit tests as these don't work on M1, see #26145. Also test universal build on M1.
Note: `macos-14` will be `macos-latest` in Q2 2024, so we'll want to switch these to keep Intel and unittest coverage on macos (while GH still offers Intel runners).
Explicitly set the build type for both deps and Nvim. They are already
explicitly set on Windows to RelWithDebInfo. Now also explicitly set
them to Debug on POSIX.
Debugging dependencies is rare so a Debug build type is usually not
needed. In cases where it _is_ needed it is easy to rebuild in Debug
mode. But since Release builds are more common, it makes more sense as a
default.
For Neovim itself we stick with a Debug build as a default, since
rebuilding and debugging is done _much_ more frequently than with
dependencies (which we _mostly_ expect to "just work").
Also remove the CMAKE_BUILD_TYPE variable in the Makefile, since this is
set by default in CMake.
Query patterns can contain quantifiers (e.g. (foo)+ @bar), so a single
capture can map to multiple nodes. The iter_matches API can not handle
this situation because the match table incorrectly maps capture indices
to a single node instead of to an array of nodes.
The match table should be updated to map capture indices to an array of
nodes. However, this is a massively breaking change, so must be done
with a proper deprecation period.
`iter_matches`, `add_predicate` and `add_directive` must opt-in to the
correct behavior for backward compatibility. This is done with a new
"all" option. This option will become the default and removed after the
0.10 release.
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
Co-authored-by: MDeiml <matthias@deiml.net>
Co-authored-by: Gregory Anders <greg@gpanders.com>
runtime(vim): Update base-syntax, remove unused vimString region
These were included with the initial release of the syntax file for Vim
5 and were probably intended to allow for syn-region start/skip/end
patterns with a '!' or '+' delimiter. However, these cases are
currently handled by the vimSynRegPat group.
The removed patterns never match anywhere in the distributed runtime
files and it is believed that this is generally true.
closes: vim/vim#140351633de8c35
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
runtime(vim): update Vim Syntax generator
- Add missing "Last Change:" line.
- The date on this line in vim.vim is updated by update_date.vim at
Make time. (I made a mistake in the file path)
- Remove unnecessary "b:loaded_syntax_vim_ex".
- Remove "Base File Date:" line in vim.vim.base
- Add Doug Kearns as Maintainer
closes: vim/vim#140315c3855bcab
Co-authored-by: h-east <h.east.727@gmail.com>
runtime(vim): include Vim Syntax generator
fixes: vim/vim#13939closes: vim/vim#14021
related: vim-jp/syntax-vim-ex#289b53c052d5
Omit the generator as it cannot be used for Nvim.
Keep vimHLGroup and vimOnlyHLGroup separate.
N/A patch:
vim-patch:b418a51933bb
Co-authored-by: h-east <h.east.727@gmail.com>