]>
Commit | Line | Data |
---|---|---|
478508cd ER |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 7.2.146 | |
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 7.2.146 | |
11 | Problem: v:warningmsg isn't used for all warnings. | |
12 | Solution: Set v:warningmsg for relevant warnings. (Ingo Karkat) | |
13 | Files: src/fileio.c, src/misc1.c, src/option.c | |
14 | ||
15 | ||
16 | *** ../vim-7.2.145/src/fileio.c Wed Mar 11 13:09:30 2009 | |
17 | --- src/fileio.c Wed Mar 18 15:03:46 2009 | |
18 | *************** | |
19 | *** 6647,6652 **** | |
20 | --- 6647,6657 ---- | |
21 | tbuf = alloc((unsigned)(STRLEN(path) + STRLEN(mesg) | |
22 | + STRLEN(mesg2) + 2)); | |
23 | sprintf((char *)tbuf, mesg, path); | |
24 | + #ifdef FEAT_EVAL | |
25 | + /* Set warningmsg here, before the unimportant and output-specific | |
26 | + * mesg2 has been appended. */ | |
27 | + set_vim_var_string(VV_WARNINGMSG, tbuf, -1); | |
28 | + #endif | |
29 | #if defined(FEAT_CON_DIALOG) || defined(FEAT_GUI_DIALOG) | |
30 | if (can_reload) | |
31 | { | |
32 | *** ../vim-7.2.145/src/misc1.c Thu Nov 20 17:09:09 2008 | |
33 | --- src/misc1.c Wed Mar 18 15:06:59 2009 | |
34 | *************** | |
35 | *** 2955,2960 **** | |
36 | --- 2955,2962 ---- | |
37 | int col; /* column for message; non-zero when in insert | |
38 | mode and 'showmode' is on */ | |
39 | { | |
40 | + static char *w_readonly = N_("W10: Warning: Changing a readonly file"); | |
41 | + | |
42 | if (curbuf->b_did_warn == FALSE | |
43 | && curbufIsChanged() == 0 | |
44 | #ifdef FEAT_AUTOCMD | |
45 | *************** | |
46 | *** 2977,2984 **** | |
47 | if (msg_row == Rows - 1) | |
48 | msg_col = col; | |
49 | msg_source(hl_attr(HLF_W)); | |
50 | ! MSG_PUTS_ATTR(_("W10: Warning: Changing a readonly file"), | |
51 | ! hl_attr(HLF_W) | MSG_HIST); | |
52 | msg_clr_eos(); | |
53 | (void)msg_end(); | |
54 | if (msg_silent == 0 && !silent_mode) | |
55 | --- 2979,2988 ---- | |
56 | if (msg_row == Rows - 1) | |
57 | msg_col = col; | |
58 | msg_source(hl_attr(HLF_W)); | |
59 | ! MSG_PUTS_ATTR(_(w_readonly), hl_attr(HLF_W) | MSG_HIST); | |
60 | ! #ifdef FEAT_EVAL | |
61 | ! set_vim_var_string(VV_WARNINGMSG, (char_u *)_(w_readonly), -1); | |
62 | ! #endif | |
63 | msg_clr_eos(); | |
64 | (void)msg_end(); | |
65 | if (msg_silent == 0 && !silent_mode) | |
66 | *** ../vim-7.2.145/src/option.c Wed Mar 18 14:19:28 2009 | |
67 | --- src/option.c Wed Mar 18 15:06:11 2009 | |
68 | *************** | |
69 | *** 7563,7571 **** | |
70 | * set. */ | |
71 | if (STRCMP(p_enc, "utf-8") != 0) | |
72 | { | |
73 | msg_source(hl_attr(HLF_W)); | |
74 | ! MSG_ATTR(_("W17: Arabic requires UTF-8, do ':set encoding=utf-8'"), | |
75 | ! hl_attr(HLF_W)); | |
76 | } | |
77 | ||
78 | # ifdef FEAT_MBYTE | |
79 | --- 7563,7575 ---- | |
80 | * set. */ | |
81 | if (STRCMP(p_enc, "utf-8") != 0) | |
82 | { | |
83 | + static char *w_arabic = N_("W17: Arabic requires UTF-8, do ':set encoding=utf-8'"); | |
84 | + | |
85 | msg_source(hl_attr(HLF_W)); | |
86 | ! MSG_ATTR(_(w_arabic), hl_attr(HLF_W)); | |
87 | ! #ifdef FEAT_EVAL | |
88 | ! set_vim_var_string(VV_WARNINGMSG, (char_u *)_(w_arabic), -1); | |
89 | ! #endif | |
90 | } | |
91 | ||
92 | # ifdef FEAT_MBYTE | |
93 | *** ../vim-7.2.145/src/version.c Wed Mar 18 14:30:46 2009 | |
94 | --- src/version.c Wed Mar 18 15:38:27 2009 | |
95 | *************** | |
96 | *** 678,679 **** | |
97 | --- 678,681 ---- | |
98 | { /* Add new patch number below this line */ | |
99 | + /**/ | |
100 | + 146, | |
101 | /**/ | |
102 | ||
103 | -- | |
104 | hundred-and-one symptoms of being an internet addict: | |
105 | 238. You think faxes are old-fashioned. | |
106 | ||
107 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
108 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
109 | \\\ download, build and distribute -- http://www.A-A-P.org /// | |
110 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |