4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Mac: Starting Vim from Finder doesn't show error messages.
12 Solution: Recognize that output is being displayed by stderr being
13 "/dev/console". (Eckehard Berns)
14 Files: src/main.c, src/message.c
17 *** ../vim-6.2.245/src/main.c Sun Feb 8 14:41:05 2004
18 --- src/main.c Sat Feb 7 18:30:04 2004
22 want_full_screen = FALSE;
25 + #if defined(FEAT_GUI_MAC) && defined(MACOS_X_UNIX)
26 + /* When the GUI is started from Finder, need to display messages in a
27 + * message box. isatty(2) returns TRUE anyway, thus we need to check the
28 + * name to know we're not started from a terminal. */
29 + if (gui.starting && (!isatty(2) || strcmp("/dev/console", ttyname(2)) == 0))
30 + want_full_screen = FALSE;
34 * mch_init() sets up the terminal (window) for use. This must be
35 * done after resetting full_screen, otherwise it may move the cursor
36 *** ../vim-6.2.245/src/message.c Mon Feb 2 12:53:51 2004
37 --- src/message.c Sat Feb 7 15:39:47 2004
41 #if (defined(UNIX) || defined(FEAT_GUI)) && !defined(ALWAYS_USE_GUI)
42 /* On Unix use stderr if it's a tty.
43 ! * When not going to start the GUI also use stderr. */
52 #if (defined(UNIX) || defined(FEAT_GUI)) && !defined(ALWAYS_USE_GUI)
53 /* On Unix use stderr if it's a tty.
54 ! * When not going to start the GUI also use stderr.
55 ! * On Mac, when started from Finder, stderr is the console. */
58 + # ifdef MACOS_X_UNIX
59 + (isatty(2) && strcmp("/dev/console", ttyname(2)) != 0)
68 #if (defined(UNIX) || defined(FEAT_GUI)) && !defined(ALWAYS_USE_GUI)
69 /* On Unix use stdout if we have a tty. This allows "vim -h | more" and
70 * uses mch_errmsg() when started from the desktop.
71 ! * When not going to start the GUI also use stdout. */
79 #if (defined(UNIX) || defined(FEAT_GUI)) && !defined(ALWAYS_USE_GUI)
80 /* On Unix use stdout if we have a tty. This allows "vim -h | more" and
81 * uses mch_errmsg() when started from the desktop.
82 ! * When not going to start the GUI also use stdout.
83 ! * On Mac, when started from Finder, stderr is the console. */
86 + # ifdef MACOS_X_UNIX
87 + (isatty(2) && strcmp("/dev/console", ttyname(2)) != 0)
94 *** ../vim-6.2.245/src/version.c Sun Feb 8 17:07:07 2004
95 --- src/version.c Sun Feb 8 17:08:14 2004
99 { /* Add new patch number below this line */
105 hundred-and-one symptoms of being an internet addict:
106 86. E-mail Deficiency Depression (EDD) forces you to e-mail yourself.
108 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
109 /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
110 \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
111 \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///