]> git.pld-linux.org Git - packages/vim.git/blame - 6.2.351
- updated to 6.2.430
[packages/vim.git] / 6.2.351
CommitLineData
05b5d6bc
AG
1To: vim-dev@vim.org
2Subject: Patch 6.2.351 (extra)
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=ISO-8859-1
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 6.2.351
11Problem: Win32: $HOME may be set to %USERPROFILE%.
12Solution: Expand %VAR% at the start of $HOME.
13Files: src/misc1.c
14
15
16*** ../vim-6.2.350/src/misc1.c Fri Mar 12 21:13:03 2004
17--- src/misc1.c Fri Mar 12 21:54:05 2004
18***************
19*** 3107,3112 ****
20--- 3107,3139 ----
21
22 #ifdef WIN3264
23 /*
24+ * Weird but true: $HOME may contain an indirect reference to another
25+ * variable, esp. "%USERPROFILE%". Happens when $USERPROFILE isn't set
26+ * when $HOME is being set.
27+ */
28+ if (var != NULL && *var == '%')
29+ {
30+ char_u *p;
31+ char_u *exp;
32+
33+ p = vim_strchr(var + 1, '%');
34+ if (p != NULL)
35+ {
36+ STRNCPY(NameBuff, var + 1, p - (var + 1));
37+ NameBuff[p - (var + 1)] = NUL;
38+ exp = mch_getenv(NameBuff);
39+ if (exp != NULL && *exp != NUL
40+ && STRLEN(exp) + STRLEN(p) < MAXPATHL)
41+ {
42+ sprintf((char *)NameBuff, "%s%s", exp, p + 1);
43+ var = NameBuff;
44+ /* Also set $HOME, it's needed for _viminfo. */
45+ vim_setenv((char_u *)"HOME", NameBuff);
46+ }
47+ }
48+ }
49+
50+ /*
51 * Typically, $HOME is not defined on Windows, unless the user has
52 * specifically defined it for Vim's sake. However, on Windows NT
53 * platforms, $HOMEDRIVE and $HOMEPATH are automatically defined for
54*** ../vim-6.2.350/src/version.c Fri Mar 12 21:16:48 2004
55--- src/version.c Fri Mar 12 21:56:38 2004
56***************
57*** 639,640 ****
58--- 639,642 ----
59 { /* Add new patch number below this line */
60+ /**/
61+ 351,
62 /**/
63
64--
65hundred-and-one symptoms of being an internet addict:
6625. You believe nothing looks sexier than a man in boxer shorts illuminated
67 only by a 17" inch svga monitor.
68
69 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
70/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
71\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
72 \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
This page took 0.035771 seconds and 4 git commands to generate.