]>
Commit | Line | Data |
---|---|---|
56e91a44 AM |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 7.2.417 | |
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.2.417 | |
11 | Problem: When 'shell' has an argument with a slash then 'shellpipe' is not | |
12 | set properly. (Britton Kerin) | |
13 | Solution: Assume there are no spaces in the path, arguments follow. | |
14 | Files: src/option.c | |
15 | ||
16 | ||
17 | *** ../vim-7.2.416/src/option.c 2010-02-24 14:34:10.000000000 +0100 | |
18 | --- src/option.c 2010-05-13 13:05:28.000000000 +0200 | |
19 | *************** | |
20 | *** 3696,3704 **** | |
21 | --- 3696,3727 ---- | |
22 | * Isolate the name of the shell: | |
23 | * - Skip beyond any path. E.g., "/usr/bin/csh -f" -> "csh -f". | |
24 | * - Remove any argument. E.g., "csh -f" -> "csh". | |
25 | + * But don't allow a space in the path, so that this works: | |
26 | + * "/usr/bin/csh --rcfile ~/.cshrc" | |
27 | + * But don't do that for Windows, it's common to have a space in the path. | |
28 | */ | |
29 | + #ifdef WIN3264 | |
30 | p = gettail(p_sh); | |
31 | p = vim_strnsave(p, (int)(skiptowhite(p) - p)); | |
32 | + #else | |
33 | + p = skiptowhite(p_sh); | |
34 | + if (*p == NUL) | |
35 | + { | |
36 | + /* No white space, use the tail. */ | |
37 | + p = vim_strsave(gettail(p_sh)); | |
38 | + } | |
39 | + else | |
40 | + { | |
41 | + char_u *p1, *p2; | |
42 | + | |
43 | + /* Find the last path separator before the space. */ | |
44 | + p1 = p_sh; | |
45 | + for (p2 = p_sh; p2 < p; mb_ptr_adv(p2)) | |
46 | + if (vim_ispathsep(*p2)) | |
47 | + p1 = p2 + 1; | |
48 | + p = vim_strnsave(p1, (int)(p - p1)); | |
49 | + } | |
50 | + #endif | |
51 | if (p != NULL) | |
52 | { | |
53 | /* | |
54 | *** ../vim-7.2.416/src/version.c 2010-05-07 16:54:32.000000000 +0200 | |
55 | --- src/version.c 2010-05-13 13:11:17.000000000 +0200 | |
56 | *************** | |
57 | *** 683,684 **** | |
58 | --- 683,686 ---- | |
59 | { /* Add new patch number below this line */ | |
60 | + /**/ | |
61 | + 417, | |
62 | /**/ | |
63 | ||
64 | -- | |
65 | If you put 7 of the most talented OSS developers in a room for a week | |
66 | and asked them to fix a bug in a spreadsheet program, in 1 week | |
67 | you'd have 2 new mail readers and a text-based web browser. | |
68 | ||
69 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
70 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
71 | \\\ download, build and distribute -- http://www.A-A-P.org /// | |
72 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |