]> git.pld-linux.org Git - packages/vim.git/blob - 6.2.246
- fix for current libselinux
[packages/vim.git] / 6.2.246
1 To: vim-dev@vim.org
2 Subject: Patch 6.2.246
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 6.2.246
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
15
16
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
19 ***************
20 *** 1160,1165 ****
21 --- 1160,1173 ----
22         want_full_screen = FALSE;
23   #endif
24   
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;
31 + #endif
32
33       /*
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
38 ***************
39 *** 2150,2159 ****
40   
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. */
44       if (
45   # ifdef UNIX
46             isatty(2)
47   #  ifdef FEAT_GUI
48             ||
49   #  endif
50 --- 2150,2164 ----
51   
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. */
56       if (
57   # ifdef UNIX
58 + #  ifdef MACOS_X_UNIX
59 +           (isatty(2) && strcmp("/dev/console", ttyname(2)) != 0)
60 + #  else
61             isatty(2)
62 + #  endif
63   #  ifdef FEAT_GUI
64             ||
65   #  endif
66 ***************
67 *** 2214,2223 ****
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. */
72       if (
73   #  ifdef UNIX
74             isatty(2)
75   #   ifdef FEAT_GUI
76             ||
77   #   endif
78 --- 2219,2233 ----
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. */
84       if (
85   #  ifdef UNIX
86 + #   ifdef MACOS_X_UNIX
87 +           (isatty(2) && strcmp("/dev/console", ttyname(2)) != 0)
88 + #   else
89             isatty(2)
90 + #    endif
91   #   ifdef FEAT_GUI
92             ||
93   #   endif
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
96 ***************
97 *** 639,640 ****
98 --- 639,642 ----
99   {   /* Add new patch number below this line */
100 + /**/
101 +     246,
102   /**/
103
104 -- 
105 hundred-and-one symptoms of being an internet addict:
106 86. E-mail Deficiency Depression (EDD) forces you to e-mail yourself.
107
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  ///
This page took 0.048044 seconds and 3 git commands to generate.