Problem: tests: Test_search_wildmenu_iminsert() depends on help file
(after 9.1.1594).
Solution: Set buffer text using setline() instead of loading help file.
Add a test for another bug fixed by 9.1.1594 (zeertzjq).
related: vim/vim#17870closes: vim/vim#17922615ad4ced1
vim-patch:8.1.0710: when using timers may wait for job exit quite long
vim-patch:8.1.0969: message written during startup is truncated
vim-patch:8.1.1043: Lua interface does not support Blob
vim-patch:8.1.1389: changes are not flushed when end and start overlap
vim-patch:8.1.1395: saving for undo may access invalid memory
vim-patch:8.1.1534: modeless selection in popup window selects too much
vim-patch:8.1.1571: textprop highlight starts too early if just after a tab
vim-patch:8.1.1573: textprop test fails if screenhots do not work
vim-patch:8.1.1663: compiler warning for using size_t
vim-patch:8.1.1866: modeless selection in GUI does not work properly
vim-patch:8.1.1871: modeless selection in GUI still not correct
vim-patch:8.1.2085: MS-Windows: draw error moving cursor over double-cell char
vim-patch:8.1.2107: various memory leaks reported by asan
vim-patch:8.1.2146: build failure
vim-patch:8.1.2296: text properties are not combined with syntax by default
vim-patch:8.1.2299: ConPTY in MS-Windows 1909 is still wrong
vim-patch:8.1.2337: double-click time sometimes miscomputed
vim-patch:8.2.0300: Vim9: expression test fails without channel support
vim-patch:8.2.0414: channel connect_waittime() test is flaky
vim-patch:8.2.0501: Vim9: script test fails when channel feature is missing
vim-patch:8.2.0508: Vim9: func and partial types not done yet
vim-patch:8.2.0527: Vim9: function types insufficiently tested
vim-patch:8.2.0565: Vim9: tests contain superfluous line continuation
vim-patch:8.2.0640: Vim9: expanding does not work
vim-patch:8.2.0700: Vim9: converting error message to exception not tested
vim-patch:8.2.0701: Vim9 test fails without job feature
vim-patch:8.2.1481: Vim9: line number reported with error may be wrong
vim-patch:8.2.1609: Vim9: test fails when build without +channel
vim-patch:8.2.1724: Vim9: assignment tests spread out
vim-patch:8.2.1759: Vim9: Some tests are still using :let
vim-patch:8.2.1865: Vim9: add() does not check type of argument
vim-patch:8.2.1867: Vim9: argument to add() not checked for blob
vim-patch:8.2.1965: Vim9: tests fail without the channel feature
vim-patch:8.2.2301: Vim9: cannot unlet a dict or list item
vim-patch:8.2.2304: Vim9: no test for unletting an imported variable
vim-patch:8.2.3006: crash when echoing a value very early
vim-patch:8.2.3007: Vim9: test for void value fails
vim-patch:8.2.3008: startup test may hang
vim-patch:8.2.3009: startup test may hang
vim-patch:8.2.3181: Vim9: builtin function test fails without channel feature
vim-patch:8.2.3242: Vim9: valgrind reports leaks in builtin function test
vim-patch:8.2.3382: crash when getting the type of a NULL partial
vim-patch:8.2.3845: Vim9: test fails when the channel feature is missing
vim-patch:8.2.4407: Vim9: some code not covered by tests
vim-patch:8.2.4410: Vim9: some code not covered by tests
vim-patch:9.0.0563: timer_info() test fails
vim-patch:9.0.2080: vim9_script test too large
vim-patch:9.1.1541: Vim9: error when last enum value ends with a comma
- Add delimiter between function signature and documentation, matching hover formatting
- Show title only if there are multiple clients or multiple signatures
- Avoid duplicating the title inside the window if it's already shown in the border
The '?' needs to be escaped, because the autocommand is using
file-patterns (glob like) and not a regex). See :h file-pattern
closes: vim/vim#17890f7deb815b0
Co-authored-by: Girish Palya <girishji@gmail.com>
Problem: make_floating_popup_options only shows when opts.border is explicitly set, ignoring global winborder setting
Solution: check both opts.border and vim.o.winborder when determining whether to show title
Using the preprocessor before generating prototypes provides some
"niceties" but the places that rely on these are pretty few.
Vastly simplifying the BUILD SYSTEM is a better trade-off.
Unbalancing { } blocks due to the preprocessor is cringe anyway (think
of the tree-sitter trees!), write these in a different way.
Add some workarounds for plattform specific features.
INCLUDE_GENERATED_DECLARATIONS flag is now technically redundant,
but will be cleaned up in a follow-up PR as it is a big mess.
Problem: python 3.12 produces warnings and fails test
Solution: Make use of raw strings in python3 tests
closes: vim/vim#12765288bf26c53
Co-authored-by: Zdenek Dohnal <zdohnal@redhat.com>
Problem: With Python 3.9 some tests fail.
Solution: Take into account the different error message. (James McCoy,
closesvim/vim#7210)
68a48ee55e
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Not all tests are executed on Github Actions.
Solution: Copy "src" to "src2" earlier. Recognize "src2" in a couple more
places. Add two tests to the list of flaky tests. (Ken Takata,
closesvim/vim#6798)
7d6979608e
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Python 3 test is old style.
Solution: Turn into new style test. (Yegappan Lakshmanan, closesvim/vim#6385)
effb0cd75d
Neovim has Lua context that conflict with asserted error message.
Disable incompatible tests due to unsupported features from
python3 provider (ie. LegacyVim bindings, vim.bindeval).
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: No space allowed before comma in list.
Solution: Legacy Vim script allows it. (closesvim/vim#6577)
4d4d1cd5c8
Partial port to guard against v8.2.1326 regression.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: no optional arguments in func type.
Solution: Check for question mark after type. Find function reference
without function().
5deeb3f1f9
Co-authored-by: Bram Moolenaar <Bram@vim.org>
The cursor movement autocommand can not detect when the final tabstop $0
is directly adjacent to another tabstop, which prevents ending the
snippet session. The fix is an early return when jumping.
Problem:
Previously, 'null' value in LSP responses were decoded as 'nil'.
This caused ambiguity for fields typed as '? | null' and led to
loss of explicit 'null' values, particularly in 'data' parameters.
Solution:
Decode all JSON 'null' values as 'vim.NIL' and adjust handling
where needed. This better aligns with the LSP specification,
where 'null' and absent fields are distinct, and 'null' should
not be used to represent missing values.
This also enables proper validation of response messages to
ensure that exactly one of 'result' or 'error' is present, as
required by the JSON-RPC specification.
Platform specific options are cringe and should either be fixed or
deleted.
In this case, the platform difference can trivially be implemented
using a conditional default value. If the user overrides the value,
then it is because the user wants that value, regardless of the
corporation who manufactured the OS that the user is running.
Possible alternative: delete the option by making it always on.
Problem:
Not easy for a user to tell ":restart" to "run this command(s) after restarting".
Solution:
All ":restart" args following the optional +cmd arg are treated as a big cmdline that is passed as a "-c" CLI arg when restarting nvim.
Problem:
Generated docs sections are ordered randomly. This matters when showing
an outline or table of contents (e.g. `gO`).
Solution:
Specify which sections have an intentional ordering; sort the rest by
name.
Add complete_check() to ccomplete completion script to avoid UI hangs
and keep Vim responsive as ccomplete can be slow on huge files.
closes: vim/vim#178263add0d5e75
vim-patch:44309b9: runtime(ccomplete): return partial results on complete_check()
closes: vim/vim#1783844309b9d08
Co-authored-by: Maxim Kim <habamax@gmail.com>
Problem: cannot perform autocompletion
Solution: Add the 'autocomplete' option value
(Girish Palya)
This change introduces the 'autocomplete' ('ac') boolean option to
enable automatic popup menu completion during insert mode. When enabled,
Vim shows a completion menu as you type, similar to pressing |i\_CTRL-N|
manually. The items are collected from sources defined in the
'complete' option.
To ensure responsiveness, this feature uses a time-sliced strategy:
- Sources earlier in the 'complete' list are given more time.
- If a source exceeds its allocated timeout, it is interrupted.
- The next source is then started with a reduced timeout (exponentially
decayed).
- A small minimum ensures every source still gets a brief chance to
contribute.
The feature is fully compatible with other |i_CTRL-X| completion modes,
which can temporarily suspend automatic completion when triggered.
See :help 'autocomplete' and :help ins-autocompletion for more details.
To try it out, use :set ac
You should see a popup menu appear automatically with suggestions. This
works seamlessly across:
- Large files (multi-gigabyte size)
- Massive codebases (:argadd thousands of .c or .h files)
- Large dictionaries via the `k` option
- Slow or blocking LSP servers or user-defined 'completefunc'
Despite potential slowness in sources, the menu remains fast,
responsive, and useful.
Compatibility: This mode is fully compatible with existing completion
methods. You can still invoke any CTRL-X based completion (e.g.,
CTRL-X CTRL-F for filenames) at any time (CTRL-X temporarily
suspends 'autocomplete'). To specifically use i_CTRL-N, dismiss the
current popup by pressing CTRL-E first.
---
How it works
To keep completion snappy under all conditions, autocompletion uses a
decaying time-sliced algorithm:
- Starts with an initial timeout (80ms).
- If a source does not complete within the timeout, it's interrupted and
the timeout is halved for the next source.
- This continues recursively until a minimum timeout (5ms) is reached.
- All sources are given a chance, but slower ones are de-prioritized
quickly.
Most of the time, matches are computed well within the initial window.
---
Implementation details
- Completion logic is mostly triggered in `edit.c` and handled in
insexpand.c.
- Uses existing inc_compl_check_keys() mechanism, so no new polling
hooks are needed.
- The completion system already checks for user input periodically; it
now also checks for timer expiry.
---
Design notes
- The menu doesn't continuously update after it's shown to prevent
visual distraction (due to resizing) and ensure the internal list
stays synchronized with the displayed menu.
- The 'complete' option determines priority—sources listed earlier get
more time.
- The exponential time-decay mechanism prevents indefinite collection,
contributing to low CPU usage and a minimal memory footprint.
- Timeout values are intentionally not configurable—this system is
optimized to "just work" out of the box. If autocompletion feels slow,
it typically indicates a deeper performance bottleneck (e.g., a slow
custom function not using `complete_check()`) rather than a
configuration issue.
---
Performance
Based on testing, the total roundtrip time for completion is generally
under 200ms. For common usage, it often responds in under 50ms on an
average laptop, which falls within the "feels instantaneous" category
(sub-100ms) for perceived user experience.
| Upper Bound (ms) | Perceived UX
|----------------- |-------------
| <100 ms | Excellent; instantaneous
| <200 ms | Good; snappy
| >300 ms | Noticeable lag
| >500 ms | Sluggish/Broken
---
Why this belongs in core:
- Minimal and focused implementation, tightly integrated with existing
Insert-mode completion logic.
- Zero reliance on autocommands and external scripting.
- Makes full use of Vim’s highly composable 'complete' infrastructure
while avoiding the complexity of plugin-based solutions.
- Gives users C native autocompletion with excellent responsiveness and
no configuration overhead.
- Adds a key UX functionality in a simple, performant, and Vim-like way.
closes: vim/vim#17812af9a7a04f1
Co-authored-by: Girish Palya <girishji@gmail.com>
Problem: Using `addr` without `range` in nvim_create_user_command gives
"No range allowed" error, inconsistent with `:command -addr` behavior.
Solution: Set EX_RANGE flag when `addr` option is specified to match
`:command` behavior.