4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
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
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
21 tbuf = alloc((unsigned)(STRLEN(path) + STRLEN(mesg)
22 + STRLEN(mesg2) + 2));
23 sprintf((char *)tbuf, mesg, path);
25 + /* Set warningmsg here, before the unimportant and output-specific
26 + * mesg2 has been appended. */
27 + set_vim_var_string(VV_WARNINGMSG, tbuf, -1);
29 #if defined(FEAT_CON_DIALOG) || defined(FEAT_GUI_DIALOG)
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
37 int col; /* column for message; non-zero when in insert
38 mode and 'showmode' is on */
40 + static char *w_readonly = N_("W10: Warning: Changing a readonly file");
42 if (curbuf->b_did_warn == FALSE
43 && curbufIsChanged() == 0
47 if (msg_row == Rows - 1)
49 msg_source(hl_attr(HLF_W));
50 ! MSG_PUTS_ATTR(_("W10: Warning: Changing a readonly file"),
51 ! hl_attr(HLF_W) | MSG_HIST);
54 if (msg_silent == 0 && !silent_mode)
56 if (msg_row == Rows - 1)
58 msg_source(hl_attr(HLF_W));
59 ! MSG_PUTS_ATTR(_(w_readonly), hl_attr(HLF_W) | MSG_HIST);
61 ! set_vim_var_string(VV_WARNINGMSG, (char_u *)_(w_readonly), -1);
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
71 if (STRCMP(p_enc, "utf-8") != 0)
73 msg_source(hl_attr(HLF_W));
74 ! MSG_ATTR(_("W17: Arabic requires UTF-8, do ':set encoding=utf-8'"),
81 if (STRCMP(p_enc, "utf-8") != 0)
83 + static char *w_arabic = N_("W17: Arabic requires UTF-8, do ':set encoding=utf-8'");
85 msg_source(hl_attr(HLF_W));
86 ! MSG_ATTR(_(w_arabic), hl_attr(HLF_W));
88 ! set_vim_var_string(VV_WARNINGMSG, (char_u *)_(w_arabic), -1);
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
98 { /* Add new patch number below this line */
104 hundred-and-one symptoms of being an internet addict:
105 238. You think faxes are old-fashioned.
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 ///