If I open the quick fix window, I get the above error. Even:
vim -u NONE -U NONE
:set verbose=15
:copen
.. the only output I get (barring the opening of said window) is:
E521: Number required: &diff = ''
Any ideas?
VIM - Vi IMproved 7.1 (2007 May 12, compiled Jun 27 2007 05:11:06)
Included patches: 1-2, 4-6, 8-12
[Fedora 7]
Google seems to highlight this as a Fedora 7 issue, but I've seen no hint
of a fix.
--
[neil@fnx ~]# rm -f .signature
[neil@fnx ~]# ls -l .signature
ls: .signature: No such file or directory
[neil@fnx ~]# exit
- I'd say setting 'verbose' to 15 is overkill (just 1 would be enough): what
do you get with
:verbose set diff?
(with the question mark)?
'diff' is a Boolean option: if you use :set diff='string' you get an error
(though I wonder where it would happen with -u NONE).
- What do you expect to see by opening the quickfix window before having set
any quickfix error file or used any quickfix-related command (such as :make,
:grep, :helpgrep, :vimgrep)?
- Vim 7.1.012 is already rather old. Patch 7.1.212 was published earlier
today. See http://users.skynet.be/antoine.mechelynck/vim/compunix.htm about
compiling Vim yourself on Linux.
Best regards,
Tony.
--
Some don't prefer the pursuit of happiness to the happiness of pursuit.
Yep. It isn't a problem on my Vim, and I can't think of any obvious reason why it
should be in any Vim.
I would suggest the best 'fix' is to get a version of Vim that's unmodified by
overenthusiastic OS distributors. Vim is pretty painless to download and compile.
Cheers,
Ben.
Send instant messages to your online friends http://au.messenger.yahoo.com
Just 'nodiff'.
> 'diff' is a Boolean option: if you use :set diff='string' you get an error
> (though I wonder where it would happen with -u NONE).
Oddly:
:set diff=''
E474: Invalid argument: diff=''
but:
:let &diff = ''
E521: Number required: &diff = ''
> - What do you expect to see by opening the quickfix window before having set
> any quickfix error file or used any quickfix-related command (such as :make,
> :grep, :helpgrep, :vimgrep)?
Well, what I get: an empty qf window. It does all work, I just get the
error (actually initially seen using the qf windows after :make).
> - Vim 7.1.012 is already rather old. Patch 7.1.212 was published earlier
> today. See http://users.skynet.be/antoine.mechelynck/vim/compunix.htm about
> compiling Vim yourself on Linux.
Yeah, I am a old-time vim hacker (I used to supply more up-to-date
RedHat/FC vim RPMs that were normally available), but given that Fedora now
*usually* has a mostly up to date version by default, I don't really have
the time to keep applying the patches myself any more :-/
I'll have a rummage through the Fedora-specific guff, although I'd have
expected -u/-U to prevent *any* of that being loaded, and I don't think they
patch the source too much, although I've not looked recently.
> This started happening a while back and I've finally gotten around to
>looking into it, but I can't for the life of me figure out what's happening;
> it's driving me potty!
>
> If I open the quick fix window, I get the above error. Even:
>
>vim -u NONE -U NONE
>
>
What does
:scriptnames
tell you after this ?
It should output nothing.
If it is, maybe 'vim' is actually a script in your distro,
or something.
-ap
--
Ich hab geträumt, der Krieg wär vorbei.
OK, I think I've pinned it down, and it looks like it's a legitimate bug
in vim:
quickfix.c:ex_copen()
set_option_value((char_u *)"diff", 0L, (char_u *)"", OPT_LOCAL);
That value should be NULL not "" like the "swf" before it.
Now, I am running a fairly old vim (Fedora's not kept it up to date), but
I can't see a patch that obviously covers it (by description), not does it
seem to be a Fedora hack gone wrong. But then I can't see why no-one else
would get it ...
I'm going to get a newer vim+patches and see if it's still there.
In the current quickfix.c (with all patches), line 2334 is:
set_option_value((char_u *)"diff", 0L, NULL, OPT_LOCAL);
which explains why I (for example) didn't get that error.
Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
226. You sit down at the computer right after dinner and your spouse
says "See you in the morning."
Cool, that means that by the time I've rebuilt, it it'll be fixed. Ta!
The only patch listed with "quickfix" in the title wasn't the fix, so it
must have snuck in on one of the others!
Patch 7.1.016 (after patch 7.1.012)
Problem: Error message about setting 'diff' to a string.
Solution: Don't pass an empty string to set_option_value() when setting
'diff'.
Files: src/quickfix.c, src/popupmnu.c
Best regards,
Tony.
--
Murphy's Law is recursive. Washing your car to make it rain doesn't
work.
Yep, that's the kiddie.
Did the build, all's right with the world again :)
FWIW, if anyone wants a Fedora 7 up-to-date vim, I've put it in:
http://repos.fnxweb.com/fedora/7/i386/
Thanks. A year or two ago, I might have tried it on SuSE Linux (which, like
RedHat & Fedora, uses RPM packages) but nowadays I compile my own. :-)
Best regards,
Tony.
--
Cauliflower is nothing but Cabbage with a College Education.
-- Mark Twain