]>
Commit | Line | Data |
---|---|---|
717fd8f6 AF |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 6.2.085 | |
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.085 | |
11 | Problem: ":verbose set ts" doesn't say an option was set with a "-c" or | |
12 | "--cmd" argument. | |
13 | Solution: Remember the option was set from a Vim argument. | |
14 | Files: src/main.c, src/ex_cmds2.c, src/vim.h | |
15 | ||
16 | ||
17 | *** ../vim-6.2.084/src/main.c Mon Jun 2 22:26:17 2003 | |
18 | --- src/main.c Mon Sep 1 22:48:42 2003 | |
19 | *************** | |
20 | *** 1264,1272 **** | |
21 | --- 1267,1281 ---- | |
22 | { | |
23 | curwin->w_cursor.lnum = 0; /* just in case.. */ | |
24 | sourcing_name = (char_u *)_("pre-vimrc command line"); | |
25 | + # ifdef FEAT_EVAL | |
26 | + current_SID = SID_CMDARG; | |
27 | + # endif | |
28 | for (i = 0; i < p_commands; ++i) | |
29 | do_cmdline_cmd(pre_commands[i]); | |
30 | sourcing_name = NULL; | |
31 | + # ifdef FEAT_EVAL | |
32 | + current_SID = 0; | |
33 | + # endif | |
34 | } | |
35 | #endif | |
36 | ||
37 | *************** | |
38 | *** 1876,1884 **** | |
39 | --- 1890,1904 ---- | |
40 | if (tagname == NULL) | |
41 | curwin->w_cursor.lnum = 0; | |
42 | sourcing_name = (char_u *)"command line"; | |
43 | + #ifdef FEAT_EVAL | |
44 | + current_SID = SID_CARG; | |
45 | + #endif | |
46 | for (i = 0; i < n_commands; ++i) | |
47 | do_cmdline_cmd(commands[i]); | |
48 | sourcing_name = NULL; | |
49 | + #ifdef FEAT_EVAL | |
50 | + current_SID = 0; | |
51 | + #endif | |
52 | if (curwin->w_cursor.lnum == 0) | |
53 | curwin->w_cursor.lnum = 1; | |
54 | ||
55 | *************** | |
56 | *** 2277,2282 **** | |
57 | --- 2297,2305 ---- | |
58 | char_u *initstr; | |
59 | char_u *save_sourcing_name; | |
60 | linenr_T save_sourcing_lnum; | |
61 | + #ifdef FEAT_EVAL | |
62 | + scid_T save_sid; | |
63 | + #endif | |
64 | ||
65 | if ((initstr = mch_getenv(env)) != NULL && *initstr != NUL) | |
66 | { | |
67 | *************** | |
68 | *** 2286,2294 **** | |
69 | --- 2309,2324 ---- | |
70 | save_sourcing_lnum = sourcing_lnum; | |
71 | sourcing_name = env; | |
72 | sourcing_lnum = 0; | |
73 | + #ifdef FEAT_EVAL | |
74 | + save_sid = current_SID; | |
75 | + current_SID = SID_ENV; | |
76 | + #endif | |
77 | do_cmdline_cmd(initstr); | |
78 | sourcing_name = save_sourcing_name; | |
79 | sourcing_lnum = save_sourcing_lnum; | |
80 | + #ifdef FEAT_EVAL | |
81 | + current_SID = save_sid;; | |
82 | + #endif | |
83 | return OK; | |
84 | } | |
85 | return FAIL; | |
86 | *** ../vim-6.2.084/src/ex_cmds2.c Sun Aug 10 22:34:58 2003 | |
87 | --- src/ex_cmds2.c Sun Sep 7 23:19:35 2003 | |
88 | *************** | |
89 | *** 2345,2350 **** | |
90 | --- 2345,2356 ---- | |
91 | { | |
92 | if (id == SID_MODELINE) | |
93 | return (char_u *)"modeline"; | |
94 | + if (id == SID_CMDARG) | |
95 | + return (char_u *)"--cmd argument"; | |
96 | + if (id == SID_CARG) | |
97 | + return (char_u *)"-c argument"; | |
98 | + if (id == SID_ENV) | |
99 | + return (char_u *)"environment variable"; | |
100 | return SCRIPT_NAME(id); | |
101 | } | |
102 | #endif | |
103 | *** ../vim-6.2.084/src/vim.h Tue Aug 12 20:01:59 2003 | |
104 | --- src/vim.h Sun Sep 7 23:53:24 2003 | |
105 | *************** | |
106 | *** 954,960 **** | |
107 | #define MIN_SWAP_PAGE_SIZE 1048 | |
108 | #define MAX_SWAP_PAGE_SIZE 50000 | |
109 | ||
110 | ! #define SID_MODELINE -1 /* script ID when using a modeline */ | |
111 | ||
112 | /* | |
113 | * Events for autocommands. | |
114 | --- 956,966 ---- | |
115 | #define MIN_SWAP_PAGE_SIZE 1048 | |
116 | #define MAX_SWAP_PAGE_SIZE 50000 | |
117 | ||
118 | ! /* Special values for current_SID. */ | |
119 | ! #define SID_MODELINE -1 /* when using a modeline */ | |
120 | ! #define SID_CMDARG -2 /* for "--cmd" argument */ | |
121 | ! #define SID_CARG -3 /* for "-c" argument */ | |
122 | ! #define SID_ENV -4 /* for sourcing environment variable */ | |
123 | ||
124 | /* | |
125 | * Events for autocommands. | |
126 | *** ../vim-6.2.084/src/version.c Thu Sep 11 21:21:21 2003 | |
127 | --- src/version.c Thu Sep 11 21:23:06 2003 | |
128 | *************** | |
129 | *** 632,633 **** | |
130 | --- 632,635 ---- | |
131 | { /* Add new patch number below this line */ | |
132 | + /**/ | |
133 | + 85, | |
134 | /**/ | |
135 | ||
136 | -- | |
137 | Snoring is prohibited unless all bedroom windows are closed and securely | |
138 | locked. | |
139 | [real standing law in Massachusetts, United States of America] | |
140 | ||
141 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
142 | /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ | |
143 | \\\ Project leader for A-A-P -- http://www.A-A-P.org /// | |
144 | \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html /// |