Problem: Using ht_used when looping through a hashtab is less reliable.
Solution: Use ht_changed in a few more places.
1f22cc5cdb
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This will be needed for #18375 as only the server should open the.
scriptfile, and redirected stdin fd will need to be used.
Also executing actions in the middle of command_line_scan() is cringe.
Problem: Some test function names do not match what they are doing.
Solution: Leave out user data for the test that is called "NoUserData".
(closesvim/vim#11703)
4cd45f1408
Nvim's tests already match function names. Add missing indent changes
and a missing comment from patch 8.2.0084.
Using team reviewers when possible reduces the churn on the git history
as we'll be able to add or remove reviewers without needing to change
the workflow files.
This requires using Github fine-grained personal access tokens with Pull
Requests set to "Read and write" and Members to "Read-only".
While `return` and `return nil` are for most intents and purposes
identical, there are situations where they're not. For example,
calculating the amount of values via the `select()` function will yield
varying results:
```lua
local function nothing() return end
local function null() return nil end
select('#', nothing()) -- 0
select('#', null()) -- 1
```
`vim.tbl_get` currently returns both nil and no results, which makes it
unreliable to use in certain situations without manually accounting for
these discrepancies.
Problem: Conflict between supercollider and scala filetype detection.
Solution: Do not check for "Class : Method", it can appear in both
filetypes. (Chris Kipp, closesvim/vim#11699)
70ef3f546b
Co-authored-by: Chris Kipp <ckipp@pm.me>
Problem: Using freed memory when autocmd changes mark.
Solution: Copy the mark before editing another buffer.
8ecfa2c56b
Nvim already copies the mark.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Apply semantic token modifiers as separate extmarks with corresponding
highlight groups (e.g., `@readonly`). This is a low-effort PR to enable
the most common use cases (applying, e.g., italics or backgrounds on top
of type highlights; language-specific fallbacks like `@global.lua` are
also available). This can be replaced by more complicated selector-style
themes later on.
Instead of testing for every possible modifier type, only test bits up
to the highest set in the token array. Saves many bit ops and
comparisons when there are no modifiers or when the highest set bit is a
lower bit than the highest possible in the legend on average.
Can be further simplified when non-luaJIT gets the full bit module (see #21222)
Problem: Matchparen is slow.
Solution: Actually use the position where the match started, not the
position where the search started. (closesvim/vim#11644)
79336e19cb
Co-authored-by: Bram Moolenaar <Bram@vim.org>
The spec indicates that the response may be `null`, but it doesn't
really say what a `null` response means. Since neovim raises an error if
the response is `null`, I figured that ignoring it would be the safest
bet.
Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
Unlike split windows, creating a new floating window does not cause
other windows to resize, so it doesn't make much sense to trigger
WinScrolled or WinResized when creating a new floating window.
1. The algorithm for applying edits was slightly incorrect. It needs to
preserve the original token list as the edits are applied instead of
mutating it as it iterates. From the spec:
Semantic token edits behave conceptually like text edits on
documents: if an edit description consists of n edits all n edits are
based on the same state Sm of the number array. They will move the
number array from state Sm to Sm+1.
2. Schedule the semantic token engine start() call in the
client._on_attach() function so that users who schedule_wrap() their
config.on_attach() functions (like nvim-lspconfig does) can still
disable semantic tokens by deleting the semanticTokensProvider from
their server capabilities.
Problem: Shift-Tab shows matches on cmdline when 'wildmenu' is off.
Solution: Only show matches when 'wildmode' contains "list". (closesvim/vim#10951)
300175fd7f
Code change has already been ported.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Command line completion doesn't always work properly.
Solution: Adjust triggering after a "|". Add more tests. (Yegappan
Lakshmanan, closesvim/vim#9779)
e3846cf1eb
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>