summaryrefslogtreecommitdiffstats
path: root/src/ex_cmds.c
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/ex_cmds.c
parent5555acc08e6f49afe00cbb8fefd687cb526a7cf2 (diff)
updated for version 7.0c12v7.0c12
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r--src/ex_cmds.c7
1 files changed, 7 insertions, 0 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)