]> git.pld-linux.org Git - packages/vim.git/blob - 7.3.203
- rel 3; no more tinfo
[packages/vim.git] / 7.3.203
1 To: vim_dev@googlegroups.com
2 Subject: Patch 7.3.203
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.3.203
11 Problem:    MS-Windows: Can't run an external command without a console window.
12 Solution:   Support ":!start /b cmd". (Xaizek)
13 Files:      runtime/doc/os_win32.txt, src/os_win32.c
14
15
16 *** ../mercurial/vim73/src/os_win32.c   2011-05-05 18:31:54.000000000 +0200
17 --- src/os_win32.c      2011-05-25 16:45:31.000000000 +0200
18 ***************
19 *** 3401,3406 ****
20 --- 3401,3407 ----
21             {
22                 STARTUPINFO             si;
23                 PROCESS_INFORMATION     pi;
24 +               DWORD                   flags = CREATE_NEW_CONSOLE;
25   
26                 si.cb = sizeof(si);
27                 si.lpReserved = NULL;
28 ***************
29 *** 3418,3423 ****
30 --- 3419,3440 ----
31                     si.dwFlags = STARTF_USESHOWWINDOW;
32                     si.wShowWindow = SW_SHOWMINNOACTIVE;
33                 }
34 +               else if ((STRNICMP(cmdbase, "/b", 2) == 0)
35 +                       && vim_iswhite(cmdbase[2]))
36 +               {
37 +                   cmdbase = skipwhite(cmdbase + 2);
38 +                   flags = CREATE_NO_WINDOW;
39 +                   si.dwFlags = STARTF_USESTDHANDLES;
40 +                   si.hStdInput = CreateFile("\\\\.\\NUL",     // File name
41 +                       GENERIC_READ,                           // Access flags
42 +                       0,                                      // Share flags
43 +                       NULL,                                   // Security att.
44 +                       OPEN_EXISTING,                          // Open flags
45 +                       FILE_ATTRIBUTE_NORMAL,                  // File att.
46 +                       NULL);                                  // Temp file
47 +                   si.hStdOutput = si.hStdInput;
48 +                   si.hStdError = si.hStdInput;
49 +               }
50   
51                 /* When the command is in double quotes, but 'shellxquote' is
52                  * empty, keep the double quotes around the command.
53 ***************
54 *** 3445,3451 ****
55                         NULL,                   // Process security attributes
56                         NULL,                   // Thread security attributes
57                         FALSE,                  // Inherit handles
58 !                       CREATE_NEW_CONSOLE,     // Creation flags
59                         NULL,                   // Environment
60                         NULL,                   // Current directory
61                         &si,                    // Startup information
62 --- 3462,3468 ----
63                         NULL,                   // Process security attributes
64                         NULL,                   // Thread security attributes
65                         FALSE,                  // Inherit handles
66 !                       flags,                  // Creation flags
67                         NULL,                   // Environment
68                         NULL,                   // Current directory
69                         &si,                    // Startup information
70 ***************
71 *** 3458,3463 ****
72 --- 3475,3485 ----
73                     EMSG(_("E371: Command not found"));
74   #endif
75                 }
76 +               if (si.hStdInput != NULL)
77 +               {
78 +                   /* Close the handle to \\.\NUL */
79 +                   CloseHandle(si.hStdInput);
80 +               }
81                 /* Close the handles to the subprocess, so that it goes away */
82                 CloseHandle(pi.hThread);
83                 CloseHandle(pi.hProcess);
84 *** ../vim-7.3.202/src/version.c        2011-05-25 15:16:06.000000000 +0200
85 --- src/version.c       2011-05-25 17:05:59.000000000 +0200
86 ***************
87 *** 711,712 ****
88 --- 711,714 ----
89   {   /* Add new patch number below this line */
90 + /**/
91 +     203,
92   /**/
93
94 -- 
95 hundred-and-one symptoms of being an internet addict:
96 108. While reading a magazine, you look for the Zoom icon for a better
97      look at a photograph.
98
99  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
100 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
101 \\\  an exciting new programming language -- http://www.Zimbu.org        ///
102  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.036827 seconds and 3 git commands to generate.