Loading ...
Sorry, an error occurred while loading the content.

73090Re: bug in confirm() and default option

Expand Messages
  • Hari Krishna Dara
    Sep 2, 2006
    • 0 Attachment
      On Sat, 2 Sep 2006 at 8:20am, Benji Fisher wrote:

      > On Sat, Sep 02, 2006 at 12:05:57AM -0700, Hari Krishna Dara wrote:
      > >
      > > 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

      This is working as expected. The index starts from 1, so 0 is invalid
      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.

      --
      Thanks,
      Hari

      __________________________________________________
      Do You Yahoo!?
      Tired of spam? Yahoo! Mail has the best spam protection around
      http://mail.yahoo.com
    • Show all 15 messages in this topic