Skip to content

Add support for specifying a list of autocmd event names to autocmd_add()#10483

Closed
yegappan wants to merge 1 commit intovim:masterfrom
yegappan:lsp
Closed

Add support for specifying a list of autocmd event names to autocmd_add()#10483
yegappan wants to merge 1 commit intovim:masterfrom
yegappan:lsp

Conversation

@yegappan
Copy link
Member

The autocmd_add() function now supports either a String with one or more
autocmd event names separated by comma or a List of event names.
It also supports a String or a List for the autocmd pattern.

@codecov
Copy link

codecov bot commented May 26, 2022

Codecov Report

Merging #10483 (4e7a8b2) into master (02e8d4e) will increase coverage by 0.00%.
The diff coverage is 88.23%.

@@           Coverage Diff           @@
##           master   #10483   +/-   ##
=======================================
  Coverage   81.67%   81.67%           
=======================================
  Files         158      158           
  Lines      185109   185162   +53     
  Branches    41867    41881   +14     
=======================================
+ Hits       151187   151231   +44     
- Misses      21469    21477    +8     
- Partials    12453    12454    +1     
Flag Coverage Δ
huge-clang-none 82.57% <87.05%> (+<0.01%) ⬆️
linux 82.57% <87.05%> (+<0.01%) ⬆️
mingw-x64-HUGE 0.00% <0.00%> (ø)
mingw-x64-HUGE-gui 78.10% <92.06%> (-0.01%) ⬇️
windows 76.88% <89.23%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/autocmd.c 85.15% <88.23%> (+0.23%) ⬆️
src/terminal.c 77.02% <0.00%> (-0.26%) ⬇️
src/channel.c 83.76% <0.00%> (-0.22%) ⬇️
src/charset.c 83.39% <0.00%> (-0.13%) ⬇️
src/libvterm/src/state.c 38.38% <0.00%> (-0.07%) ⬇️
src/netbeans.c 72.81% <0.00%> (+0.07%) ⬆️
src/gui.c 73.21% <0.00%> (+0.13%) ⬆️
src/os_unix.c 67.08% <0.00%> (+0.21%) ⬆️
src/profiler.c 83.81% <0.00%> (+0.66%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 02e8d4e...4e7a8b2. Read the comment docs.

@chrisbra
Copy link
Member

either a String with one or more autocmd event names separated by comma or a List of event names

Shouldn't we be more consistent here and either allow String for single events or list with multiple events? Or maybe even better disallow strings at all and only allow a list of events (since this is pretty new, shouldn't break users expectations yet I hope)?

@brammool
Copy link
Contributor

The most obvious would be allow for a string with a single item, and a list of strings with at least one item.
Each string should be one event name. I don't think we need to strip white space.

@vim-ml
Copy link

vim-ml commented May 26, 2022 via email

@yegappan yegappan force-pushed the lsp branch 2 times, most recently from e2ba2de to e645351 Compare May 27, 2022 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants