summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-04-07 21:40:07 +0000
committerBram Moolenaar <Bram@vim.org>2006-04-07 21:40:07 +0000
commit61660eadced09491ef8ee0a7d4af73cc75fdc349 (patch)
treebe677bd7256c7501f70062c7d3306a975badd408 /src
parent5555acc08e6f49afe00cbb8fefd687cb526a7cf2 (diff)
updated for version 7.0c12v7.0c12
Diffstat (limited to 'src')
-rw-r--r--src/ex_cmds.c7
-rw-r--r--src/ex_cmds.h6
-rw-r--r--src/ex_cmds2.c16
-rw-r--r--src/hardcopy.c2
-rw-r--r--src/version.h6
5 files changed, 23 insertions, 14 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index bf03721786..790b30ef1f 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -4287,6 +4287,13 @@ do_sub(eap)
if (eap->skip) /* not executing commands, only parsing */
return;
+ if (!do_count && !curbuf->b_p_ma)
+ {
+ /* Substitusion is not allowed in non-'modifiable' buffer */
+ EMSG(_(e_modifiable));
+ return;
+ }
+
if (search_regcomp(pat, RE_SUBST, which_pat, SEARCH_HIS, &regmatch) == FAIL)
{
if (do_error)
diff --git a/src/ex_cmds.h b/src/ex_cmds.h
index 32e079d3b6..278a096ff5 100644
--- a/src/ex_cmds.h
+++ b/src/ex_cmds.h
@@ -768,7 +768,7 @@ EX(CMD_rubyfile, "rubyfile", ex_rubyfile,
EX(CMD_rviminfo, "rviminfo", ex_viminfo,
BANG|FILE1|TRLBAR|CMDWIN),
EX(CMD_substitute, "substitute", do_sub,
- RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY),
+ RANGE|WHOLEFOLD|EXTRA|CMDWIN),
EX(CMD_sNext, "sNext", ex_previous,
EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR),
EX(CMD_sargument, "sargument", ex_argument,
@@ -828,7 +828,7 @@ EX(CMD_sleep, "sleep", ex_sleep,
EX(CMD_slast, "slast", ex_last,
EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR),
EX(CMD_smagic, "smagic", ex_submagic,
- RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY),
+ RANGE|WHOLEFOLD|EXTRA|CMDWIN),
EX(CMD_smap, "smap", ex_map,
EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
EX(CMD_smapclear, "smapclear", ex_mapclear,
@@ -840,7 +840,7 @@ EX(CMD_snext, "snext", ex_next,
EX(CMD_sniff, "sniff", ex_sniff,
EXTRA|TRLBAR),
EX(CMD_snomagic, "snomagic", ex_submagic,
- RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY),
+ RANGE|WHOLEFOLD|EXTRA|CMDWIN),
EX(CMD_snoremap, "snoremap", ex_map,
EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
EX(CMD_snoremenu, "snoremenu", ex_menu,
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index ab616bb729..3d6e217d51 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -1488,7 +1488,7 @@ check_changed_any(hidden)
* may cause a redraw. But wait_return() is a no-op when vgetc()
* is busy (Quit used from window menu), then make sure we don't
* cause a scroll up. */
- if (vgetc_busy)
+ if (vgetc_busy > 0)
{
msg_row = cmdline_row;
msg_col = 0;
@@ -3696,20 +3696,20 @@ get_locale_val(what)
* redefined and it doesn't use the arguments. */
loc = setlocale(what, NULL);
-# if defined(__BORLANDC__)
+# ifdef WIN32
if (loc != NULL)
{
char_u *p;
- /* Borland returns something like "LC_CTYPE=<name>\n"
- * Let's try to fix that bug here... */
+ /* setocale() returns something like "LC_COLLATE=<name>;LC_..." when
+ * one of the values (e.g., LC_CTYPE) differs. */
p = vim_strchr(loc, '=');
if (p != NULL)
{
loc = ++p;
while (*p != NUL) /* remove trailing newline */
{
- if (*p < ' ')
+ if (*p < ' ' || *p == ';')
{
*p = NUL;
break;
@@ -3778,8 +3778,10 @@ get_mess_lang()
p = (char_u *)get_locale_val(LC_MESSAGES);
# else
/* This is necessary for Win32, where LC_MESSAGES is not defined and $LANG
- * may be set to the LCID number. */
- p = (char_u *)get_locale_val(LC_ALL);
+ * may be set to the LCID number. LC_COLLATE is the best guess, LC_TIME
+ * and LC_MONETARY may be set differently for a Japanese working in the
+ * US. */
+ p = (char_u *)get_locale_val(LC_COLLATE);
# endif
# else
p = mch_getenv((char_u *)"LC_ALL");
diff --git a/src/hardcopy.c b/src/hardcopy.c
index e6c89a6168..2b5c70e231 100644
--- a/src/hardcopy.c
+++ b/src/hardcopy.c
@@ -2474,7 +2474,7 @@ mch_print_init(psettings, jobname, forceit)
double bottom;
#ifdef FEAT_MBYTE
int props;
- int cmap;
+ int cmap = 0;
char_u *p_encoding;
struct prt_ps_encoding_S *p_mbenc;
struct prt_ps_encoding_S *p_mbenc_first;
diff --git a/src/version.h b/src/version.h
index e3bccb55c2..993e7475c5 100644
--- a/src/version.h
+++ b/src/version.h
@@ -35,6 +35,6 @@
*/
#define VIM_VERSION_NODOT "vim70c"
#define VIM_VERSION_SHORT "7.0c"
-#define VIM_VERSION_MEDIUM "7.0c11 BETA"
-#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0c11 BETA (2006 Apr 6)"
-#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0c11 BETA (2006 Apr 6, compiled "
+#define VIM_VERSION_MEDIUM "7.0c12 BETA"
+#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0c12 BETA (2006 Apr 7)"
+#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0c12 BETA (2006 Apr 7, compiled "