When the edited file is a symlink, the unexpanded file name is needed to
to achieve the same behavior as the autocommand pattern matching in Vim.
Neither args.file nor args.match are guaranteed to be unexpanded, so use
bufname() instead.
Problem: Vim9: string index and slice does not include composing chars.
Solution: Include composing characters. (issue vim/vim#6563)
0289a093a4
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: string and list index work differently.
Solution: Make string index work like list index. (closesvim/vim#7643)
e7525c5520
Co-authored-by: Bram Moolenaar <Bram@vim.org>
runtime(vim): Update base-syntax, remove old unused syntax groups. (vim/vim#14146)
Remove old unused syntax groups.
- vimRegion, vimPattern and vimKeyword removed in Vim 5.3.
- vimAuSyntax, vimAutoCmdOpt, vimAutoSet and vimStatement removed in 5.6.
The following were linked in :hi commands but never defined with :syn
and, most likely, never used:
- vimHLMod introduced in 5.0.
- vimKeycode and vimKeycodeError introduced in 5.4.
- vimElseif introduced in 5.6.
- vimFold introduced in 6.4.
- vimOperStar (and vimoperStar) introduced in 9.0.
76d62985c1
Co-authored-by: dkearns <dougkearns@gmail.com>
runtime(vim): Update base-syntax, improve function definition highlighting (vim/vim#14203)
Improve function definition highlighting.
- Match bang and function modifiers - abort etc.
- Only match valid scope modifiers.
- Match listing commands.
- Don't match ex commands in function names.
- Split function syntax groups into :func and :def subgroups.
- Match Vim9-script parameter and return types.
- Limit legacy-script and Vim9-script comments to :func and :def
definitions, respectively.
35e6f4ca27
Omit the vimFunctionError change as it's a whitespace-only change and
will likely be superseded by later patches.
Co-authored-by: dkearns <dougkearns@gmail.com>
Problem: memleak with ex_drop(), NULL dereference
(zeertzjq)
Solution: revert back to ex_rewind(), use curbuf instead of buf
fixes: vim/vim#14246closes: vim/vim#1425185a769d466
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: :drop tries to :rewind the argumentlist, which results in E37
(after v9.1.0046)
Solution: instead of calling ex_rewind(), call open_buffer() only when
re-using the initial empty buffer
fixes: vim/vim#14219closes: vim/vim#14220978178823b
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: gcc complains about uninitialized var
(Tony Mechelynck)
Solution: initialize to NULL
9eb236f455
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: `xctz()` uses a fallback algorithm for MSVC, even though a compiler builtin exists.
Solution: Make `xctz()` use the compiler builtin for MSVC compiler.
Problem: `set_string_option_direct()` contains a separate codepath specifically for setting string options. Not only is that unnecessary code duplication, but it's also limited to only string options.
Solution: Replace `set_string_option_direct()` with `set_option_direct()` which calls `set_option()` under the hood. This reduces code duplication and allows directly setting an option of any type.
Problem: Description of highlight groups for LSP semantic tokens can be
more up to date and useful.
Right now it misses several actually defined highlight groups and
presents information about Vim highlight groups they are linked to.
This is both outdated (they link to tree-sitter `@` groups now) and
redundant (users can see this information with `:Inspect` over the
group name itself).
Solution: Synchronize the list of groups with specification and provide
actionable descriptions.
Problem: complete_info() returns wrong order of items
(after v9.0.2018)
Solution: Revert Patch v9.0.2018
(Girish Palya)
bug fix: complete_info() gives wrong results
1) complete_info() reverses list of items during <c-p>
2) 'selected' item index is wrong during <c-p>
3) number of items returnd can be wrong
Solution:
- Decouple 'cp_number' from 'selected' index since they need not be
correlated
- Do not iterate the list backwards
- Add targeted tests
Regression introduced by 69fb5afb3b
Following are unnecessary commits to patch problems from above:
fef6630166daef8c7437
All the tests from above commits are retained though.
fixes: vim/vim#14204closes: vim/vim#142418950bf7f8b
Remove EMPTY_IF_NULL() as it has been unnecessary since #12673.
Co-authored-by: Girish Palya <girishji@gmail.com>
runtime(deb822sources): Add minimal ftplugin (vim/vim#14240)
Set comment related options and avoid automatic line wrapping.
2708c0b585
Co-authored-by: James McCoy <jamessan@jamessan.com>
runtime(vim): Update base-syntax, disallow '.' at start of menu item names (vim/vim#14232)
Disallow '.' at the start of a menu item name.
This is the menu path separator character and should be escaped with a
'\' in this case.
Partially fixesvim/vim#14230. "popup" is still incorrectly matched as the Ex
command.
ec21bafc13
Co-authored-by: dkearns <dougkearns@gmail.com>
Problem: Vento files are not recognized.
Solution: Recognize *.vto files as filetype "vento" (wrapperup)
Vento is a templating engine https://vento.js.org/closes: vim/vim#142299f26e5a9bc
Co-authored-by: wrapperup <wrapperup4@gmail.com>
Problem: assertion failure in nvim_create_buf if buflist_new autocommands open
a swapfile when "scratch" is set.
Solution: block autocommands when setting up the buffer; fire them later
instead.
Note that, unlike buflist_new, I don't check if autocommands aborted script
processing; the buffer is already created and configured at that point, so might
as well return the handle anyway.
Rather than repeat try_{start,end} and {un}block_autocmds for each relevant
operation, just do it at the start and near the end. This means that, if
TermResponse fires from unblock_autocmds for whatever reason, it can see the
buffer in an already configured state if we didn't bail due to an error (plus
it's probably a bit cleaner this way).
Problem:
`TSNode:_rawquery()` is complicated, has known issues and the Lua and
C code is awkwardly coupled (see logic with `active`).
Solution:
- Add `TSQueryCursor` and `TSQueryMatch` bindings.
- Replace `TSNode:_rawquery()` with `TSQueryCursor:next_capture()` and `TSQueryCursor:next_match()`
- Do more stuff in Lua
- API for `Query:iter_captures()` and `Query:iter_matches()` remains the same.
- `treesitter.c` no longer contains any logic related to predicates.
- Add `match_limit` option to `iter_matches()`. Default is still 256.
Problem: Not all standard treesitter groups are documented.
Solution: Document them all (without relying on fallback); add default
link for new `*.builtin` groups to `Special` and `@keyword.type` to
`Structure`. Remove `@markup.environment.*` which only made sense for
LaTeX.
This will reduce friction as developers no longer need to provide a hash
when testing out different commits.
To skip the hash check, set `DEPS_IGNORE_SHA` to `TRUE` in
`cmake.deps/CMakeLists.txt`.