Problem: Using common name in tests leads to flaky tests.
Solution: Rename files and directories to be more specific.
3b0d70f4ff
This includes only test_help.vim changes.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem:
Crash on startup in some situations due to call to `set_curbuf`
with the current value of `cur_buf`.
Solution:
Switch buffers before doing the wipeout of the stdin buffer.
Use cmdline cmds instead of raw buffer pointers to avoid lifetime issues.
PR #34876 expanded the total range of values that cjson considers
valid. However, it didn't address the bigger problem of storing a
`long long` value in a `lua_Integer` (which is typically a typedef for
`ptrdiff_t`).
On 32-bit platforms, this ends up storing an 8-byte number into a 4-byte
variable, truncating the value.
Store the converted value in a temporary `long long` variable so we can
detect the scenario and decode into a `lua_Number`.
In Windows [/] should be escaped [\/]:
autocmd CmdlineChanged [:\/\?] call wildtrigger()
This updated example works both in Linux and Windows.
closes: vim/vim#182625a9ef93b2c
Co-authored-by: Maxim Kim <habamax@gmail.com>
Problem: tests: No test when deleting text after autocompletion with preinsert
did complete an entry
Solution: Verify, that after deletion autocompletion does not reinsert
the deleted text. Note: the actual issue was fixed with v9.1.1750.
(Girish Palya)
Pre v9.1.1750 behaviour:
When autocomplete is enabled with *preinsert*, deleting text after selecting a
longer match could cause unintended reinsertion, e.g.:
- Matches available: "foo" and "foobar".
- User selects "foobar" with Ctrl-N
- User deletes characters back to "foo".
- Autocomplete then incorrectly re-inserts "bar", preventing deletion past "foo".
v9.1.1750 removes the unwanted reinsertion so text can be deleted correctly.
closes: vim/vim#18259fe0061c609
Co-authored-by: Girish Palya <girishji@gmail.com>
Problem: completion: preinserted text highlighed using ComplMatchIns
Solution: Use highlighting group PreInsert and update the documentation
(Girish Palya).
When "preinsert" is included in 'completeopt', only the PreInsert
highlight group should be applied, whether autocompletion is active or not.
Previously, ComplMatchIns was used when autocompletion was not enabled.
Related to https://github.com/vim/vim/pull/18213.
closes: vim/vim#182542525c56e42
Co-authored-by: Girish Palya <girishji@gmail.com>
Notably, the existence of a swap file like .buffer.c.swp might cause
mayhem. As a reasonable filter, only process *.c and *.h files using the
c grammar.
Problem: potential buffer-overflow in find_pattern_in_path()
Problem: Verify ptr p has enough room before adding ins_compl_len()
fixes: vim/vim#18195closes: vim/vim#1824921ecb0d2e2
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: The rightleft and arabic features are disabled.
Solution: Re-enable the features, some users want to use the functionality.
ae906c8b1b
bug-reports -> bug-report
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Cannot close a popup by the X when a filter consumes all events.
Solution: Check for a click on the close button before invoking filters.
(closesvim/vim#4858)
f63962378d
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: When redrawing popups plines_win() may be called often.
Solution: Pass a cache to mouse_comp_pos().
9d5ffceb3f
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: completion: redo (.) broken with preinsert and autocompletion
Solution: Make redo (.) work with preinsert and autocompletion
(Girish Palya)
closes: vim/vim#18253306a138172
Co-authored-by: Girish Palya <girishji@gmail.com>
This partially reverts 0b8a72b739,
that is unreverts 15e77a56b7
"priority" is an internal neovim concept which does not occur in shared
queries. Ideally a single priority space should eventually be enough
for our needs. But as we don't want to poke at the usages of
priorities right now in the wider ecosystem,
introduce the "subpriorities" so that treesitter code can distinguish
highlights of the same priorities with different tree nesting depth.
This mainly affects `injection.combined` as parent-tree nodes might appear
in the middle of child-tree nodes which otherwise is not possible.
Continuing the work of #31400
That PR allowed the provider to be invoked multiple times per line.
We want only to do that when there actually is more data later on the
line. Additionally, we want to skip over lines which contain no new
highlight items. The TS query cursor already tells us what the next
position with more data is, so there is no need to reinvoke the range
callback before that.
NB: this removes the double buffering introduced in #32619 which
is funtamentally incompatible with this (nvim core is supposed to keep
track of long ranges by itself, without requiring a callback reinvoke
blitz). Need to adjust the priorities some other way to fix the same issue.
The ellipsis literal (`...`) can be used in multiple contexts:
- Placeholders: `class Foo: ...`
- Containers: `Tuple[int, ...]`
- Assignments: `x = ...`
This is a trickier pattern to match because we can't rely on keyword
boundaries, so we instead look for exactly three dots (`...`).
This does mean that we will match the `...` portion of `x...x`, which
isn't valid Python syntax, but I think that's an acceptable trade-off
that avoids making this pattern much more complex.
Reference:
- https://docs.python.org/3/library/constants.html#Ellipsiscloses: vim/vim#1810777cfc49060
Co-authored-by: Jon Parise <jon@indelible.org>
Problem: complete: preinsert does not work well with preinsert
Solution: Make "preinsert" completeopt value work with autocompletion
(Girish Palya)
This change extends Insert mode autocompletion so that 'preinsert' also
works when 'autocomplete' is enabled.
Try: `:set ac cot=preinsert`
See `:help 'cot'` for more details.
closes: vim/vim#18213fa6fd41a94
Co-authored-by: Girish Palya <girishji@gmail.com>
Problem: nvim_win_set_config may crash when attempting to move curwin to a
different tabpage if there is no other non-float available to switch to.
Solution: fix the crash. Fix ONE_WINDOW checks in winframe_find_altwin and
win_altframe to consider floating windows by instead using one_window. Allow
one_window to consider non-current tabpages. We can use one_window in
win_close_othertab now to also better reflect its use in win_close.
Co-authored-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Problem: cmdline-autocompletion breaks history navigation (ddad431)
Solution: Support history navigation in cmdline autocompletion (Girish
Palya)
Up/Down arrows support history navigation when using wildtrigger()
fixes: vim/vim#18207closes: vim/vim#18219708ab7f5fb
Co-authored-by: Girish Palya <girishji@gmail.com>
Problem:
Currently, prompt_buffer manages `:` mark by itself and exposes it
read-only mark. However when it fails there can be no mitigation made
by plugins. The `:` mark should act like a regular marks and be
modifiable.
Solution:
Allow plugins to set `:` mark.
Problem:
These "foo.vim" syntax tags add 100+ useless tags to help. In
particular, "progress.vim" is the first match for "progress", which not
the result anyone is actually looking for, since Nvim 0.12 gained the
"progress-message" feature.
Solution:
Drop the "foo.vim" syntax tags. The "ft-foo" tags are more appropriately
named.
The flakiness happens because get() uses vim.schedule(), and a following
key may be processed before the scheduled event. Use poke_eventloop() to
ensure that the scheduled event is processed.
Problem: Matches may be listed twice with wildmode=longest,list when
"longest" doesn't change command line (after 9.1.1737).
Solution: Set did_wild_list when trying "list" after "longest"
(zeertzjq).
closes: vim/vim#18227a28a2eb9d9
Problem: Patch v9.1.1714 introduce a regression for wildmenu (zeertzjq)
Solution: Restore behavior of "longest" in 'wildmode' (Girish Palya)
- Fixed a regression caused by PR vim/vim#18125 selecting wrong item
- Fixed another regression where the first pasted text did not appear on
the command-line after starting Vim.
closes: vim/vim#182128fec92d631
Co-authored-by: Girish Palya <girishji@gmail.com>