confirm() documentation bug?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

confirm() documentation bug?

Peter Odding-3
Hi list,

I'm still working on my session plug-in and while doing so I think I
found a bug in the documentation for the confirm() function: The entry
for confirm() says that the optional {type} argument only works in the
Win32 GUI, but I just tried and it works fine in the GTK2 GUI :-)

After inspecting the various src/gui_*.c files it appears that the type
argument is supported in the GTK, Mac, Motif and Win32 GUI. The attached
patch changes the help entry for confirm() to mention all of these
platforms, though the sentence could also just be removed from the text
given that most platforms are now apparently supported!

  - Peter Odding

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

diff -uNr vim-7.2/runtime/doc/eval.txt{.orig,}
--- vim-7.2/runtime/doc/eval.txt.orig 2010-06-26 06:58:30.741403288 +0200
+++ vim-7.2/runtime/doc/eval.txt 2010-06-26 07:21:36.432653923 +0200
@@ -2312,11 +2312,11 @@
  that is made if the user hits <CR>.  Use 1 to make the first
  choice the default one.  Use 0 to not set a default.  If
  {default} is omitted, 1 is used.
- The optional {type} argument gives the type of dialog. This
- is only used for the icon of the Win32 GUI.  It can be one of
- these values: "Error", "Question", "Info", "Warning" or
- "Generic".  Only the first character is relevant.  When {type}
- is omitted, "Generic" is used.
+ The optional {type} argument gives the type of dialog.  This
+ is only used for the icon of the GTK, Mac, Motif and Win32
+ GUI.  It can be one of these values: "Error", "Question",
+ "Info", "Warning" or "Generic".  Only the first character is
+ relevant.  When {type} is omitted, "Generic" is used.
  If the user aborts the dialog by pressing <Esc>, CTRL-C,
  or another valid interrupt key, confirm() returns 0.
Reply | Threaded
Open this post in threaded view
|

Re: confirm() documentation bug?

Bram Moolenaar

Peter Odding wrote:

> I'm still working on my session plug-in and while doing so I think I
> found a bug in the documentation for the confirm() function: The entry
> for confirm() says that the optional {type} argument only works in the
> Win32 GUI, but I just tried and it works fine in the GTK2 GUI :-)
>
> After inspecting the various src/gui_*.c files it appears that the type
> argument is supported in the GTK, Mac, Motif and Win32 GUI. The attached
> patch changes the help entry for confirm() to mention all of these
> platforms, though the sentence could also just be removed from the text
> given that most platforms are now apparently supported!

Thanks, I'll include it.

--
"Marriage is the process of finding out what kind of man your wife
would have preferred"

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php