73090Re: bug in confirm() and default option
- Sep 2, 2006On Sat, 2 Sep 2006 at 8:20am, Benji Fisher wrote:
> On Sat, Sep 02, 2006 at 12:05:57AM -0700, Hari Krishna Dara wrote:This is working as expected. The index starts from 1, so 0 is invalid
> > According to the help, if you specify a value of 0 for default, none of
> > the choices should be selected, but this is not how it is working. I
> > tried both on win32 and cygwin (X) gvim and both default to 1 instead.
> > Is there another trick to not select any of the choices?
> I get the same behavior on Linux (FC2). In vim (not gvim),
> :echo confirm("Save changes?", "&Yes\n&No\n&Cancel", 0)
> echoes 0 if I hit <CR> without making a choice.
> HTH --Benji Fisher
and is right in this case. Interestingly, if you pass an invalid number,
say 4, console vim returns 4 back (not 0) but the gui version returns 1.
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
- << Previous post in topic Next post in topic >>