]>
Commit | Line | Data |
---|---|---|
05b5d6bc AG |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 6.2.341 (extra) | |
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.341 (extra) | |
11 | Problem: Win32: When the path to diff.exe contains a space and using the | |
12 | vimrc generated by the install program, diff mode does not work. | |
13 | Solution: Put the first double quote just before the space instead of before | |
14 | the path. | |
15 | Files: src/dosinst.c | |
16 | ||
17 | ||
18 | *** ../vim-6.2.340/src/dosinst.c Fri Jul 25 22:43:59 2003 | |
19 | --- src/dosinst.c Wed Mar 10 12:42:30 2004 | |
20 | *************** | |
21 | *** 1122,1127 **** | |
22 | --- 1122,1128 ---- | |
23 | { | |
24 | FILE *fd, *tfd; | |
25 | char *fname; | |
26 | + char *p; | |
27 | ||
28 | /* If an old vimrc file exists, overwrite it. | |
29 | * Otherwise create a new one. */ | |
30 | *************** | |
31 | *** 1176,1186 **** | |
32 | fprintf(fd, " let opt = ''\n"); | |
33 | fprintf(fd, " if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif\n"); | |
34 | fprintf(fd, " if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif\n"); | |
35 | ! /* Use quotes here if the path includes a space. */ | |
36 | ! if (strchr(installdir, ' ') != NULL) | |
37 | ! fprintf(fd, " silent execute '!\"%s\\diff\" -a ' . opt . '\"' . v:fname_in . '\" \"' . v:fname_new . '\" > \"' . v:fname_out . '\"'\n", installdir); | |
38 | else | |
39 | ! fprintf(fd, " silent execute '!%s\\diff -a ' . opt . '\"' . v:fname_in . '\" \"' . v:fname_new . '\" > \"' . v:fname_out . '\"'\n", installdir); | |
40 | fprintf(fd, "endfunction\n"); | |
41 | fprintf(fd, "\n"); | |
42 | } | |
43 | --- 1177,1196 ---- | |
44 | fprintf(fd, " let opt = ''\n"); | |
45 | fprintf(fd, " if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif\n"); | |
46 | fprintf(fd, " if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif\n"); | |
47 | ! fprintf(fd, " silent execute '!"); | |
48 | ! p = strchr(installdir, ' '); | |
49 | ! if (p != NULL) | |
50 | ! { | |
51 | ! /* The path has a space. Put a double quote just before the space | |
52 | ! * and at the end of the command. Putting quotes around the whole | |
53 | ! * thing doesn't work. */ | |
54 | ! *p = NUL; | |
55 | ! fprintf(fd, "%s\" %s\\diff\"", installdir, p + 1); | |
56 | ! *p = ' '; | |
57 | ! } | |
58 | else | |
59 | ! fprintf(fd, "%s\\diff", installdir); | |
60 | ! fprintf(fd, " -a ' . opt . '\"' . v:fname_in . '\" \"' . v:fname_new . '\" > \"' . v:fname_out . '\"'\n"); | |
61 | fprintf(fd, "endfunction\n"); | |
62 | fprintf(fd, "\n"); | |
63 | } | |
64 | *** ../vim-6.2.340/src/version.c Thu Mar 11 17:48:22 2004 | |
65 | --- src/version.c Thu Mar 11 20:45:16 2004 | |
66 | *************** | |
67 | *** 639,640 **** | |
68 | --- 639,642 ---- | |
69 | { /* Add new patch number below this line */ | |
70 | + /**/ | |
71 | + 341, | |
72 | /**/ | |
73 | ||
74 | -- | |
75 | hundred-and-one symptoms of being an internet addict: | |
76 | 4. Your eyeglasses have a web site burned in on them. | |
77 | ||
78 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
79 | /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
80 | \\\ Project leader for A-A-P -- http://www.A-A-P.org /// | |
81 | \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html /// |