Previously this would kind-of work: if there's nothing on the cmdline it
works, but if you type anything and press Tab you get a literal tab
character.
This can be confusing, especially if you use -complete=custom, since you
might be thinking you somehow implemented this wrong.
Fixes #8541
https://github.com/vim/vim/pull/8544
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
Merging #8544 (ab3619e) into master (482d2f3) will decrease coverage by
87.53%.
The diff coverage is0.00%.
❗ Current head ab3619e differs from pull request most recent head 50cdfb7. Consider uploading reports for the commit 50cdfb7 to get more accurate results
@@ Coverage Diff @@ ## master #8544 +/- ## =========================================== - Coverage 90.03% 2.49% -87.54% =========================================== Files 150 148 -2 Lines 168173 162914 -5259 =========================================== - Hits 151413 4066 -147347 - Misses 16760 158848 +142088
| Flag | Coverage Δ | |
|---|---|---|
| huge-clang-none | ? |
|
| huge-gcc-none | ? |
|
| huge-gcc-testgui | ? |
|
| huge-gcc-unittests | 2.49% <0.00%> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/usercmd.c | 0.00% <0.00%> (-94.78%) |
⬇️ |
| src/float.c | 0.00% <0.00%> (-98.91%) |
⬇️ |
| src/digraph.c | 0.00% <0.00%> (-97.78%) |
⬇️ |
| src/gui_gtk_f.c | 0.00% <0.00%> (-97.54%) |
⬇️ |
| src/match.c | 0.00% <0.00%> (-97.13%) |
⬇️ |
| src/crypt_zip.c | 0.00% <0.00%> (-97.06%) |
⬇️ |
| src/sound.c | 0.00% <0.00%> (-97.00%) |
⬇️ |
| src/sha256.c | 0.00% <0.00%> (-96.94%) |
⬇️ |
| src/evalbuffer.c | 0.00% <0.00%> (-96.83%) |
⬇️ |
| src/cmdhist.c | 0.00% <0.00%> (-96.63%) |
⬇️ |
| ... and 137 more |
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 482d2f3...50cdfb7. Read the comment docs.
perhaps you are waiting some complains, then here we go:
@tpope your fugitive has some -nargs=0 and with -complete, now broken... :-)
Yes, one of the most popular plugins out there (vim-fugitive) has 4 commands defined with -nargs=0 and -complete. It's broken by this patch:
vim -Nu NONE +'command -nargs=0 -complete=arglist Comd eval 0'
E1208: -complete used without -nargs
I don't know whether it makes sense to have -nargs=0 and -complete at the same time, but I do know that we will receive a lot of complaints.
It would help if that plugin would fix it; not many people run the latest master and many distros are weeks, months, or years behind.
Easy fix, but your argument cuts both ways: Many people update Vim regularly alongside their distro, but never bother to manually update their plugins.
Many people update Vim regularly alongside their distro, but never bother to manually update their plugins.
True, so we probably need to make an exception for -nargs=0, and handle the latter as if it was -nargs=1; at least for this particular check. Otherwise, we will get too many complaints from various popular plugins.
Although, maybe the check could be more strict in Vim9 script.
Well, we could make it a warning. The the plugin won't break and there is a hint that something is wrong.
pls Do Not Forget we may be Not Able to Find the maintainer of some classic plugins anymore.........................
// in short, This is terrible!
—
You are receiving this because you commented.
Well, you can ignore them or fix the problem.
—
You are receiving this because you commented.
pls Do Not Forget we may be Not Able to Find the maintainer of some classic plugins anymore
Do we know which plugins have this error (now warning)? It may not be so bad if there are very few plugins affected and if the change helps to detect issues. I use several plugins and I only noticed the error with the fugitive plugin (which is very popular). It was fixed immediately when did PlugUpdate.
—
You are receiving this because you commented.
Well, you can ignore them or fix the problem.
supposed you were answering to Gary's question, or i knew i may can fork or local edit some, but mostly such cannot replace the original/owner's role(ownership) of his/her repo, not a good solution.
// anyway, compatible looks was vim always insisted working style. i think we should keep it so...
—
You are receiving this because you commented.
Would that mean that I would see warning messages every time
I started Vim, and have to hit Enter to clear those messages?
I've just checked and yes, you need to hit Enter. I think the best way to handle the issue would be to log the warning (which can be read later at any time with :messages) without interrupting Vim on startup, and forcing the user to press Enter to get rid of the message.
—
You are receiving this because you commented.
Maybe give the warning only if 'verbose' is set to some arbitrary value greater than the default (which is 0).
—
You are receiving this because you commented.
A warning in :messages is pretty invisible, and even more so with :verbose.
The entire reason I looked at this is because -complete=custom,.. didn't work and that I thought the error was in my custom function, while it turned out that I just forgot -nargs; I lost a good 20-30 minutes on this. Silly on my part, but I'm probably not the first one.
No option is perfect here, but a warning seems like a decent compromise unless there's a whole bunch of other plugins that break (and it's not clear to me that's the case).
—
You are receiving this because you commented.