diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-04-07 21:40:07 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-04-07 21:40:07 +0000 |
commit | 61660eadced09491ef8ee0a7d4af73cc75fdc349 (patch) | |
tree | be677bd7256c7501f70062c7d3306a975badd408 /src/ex_cmds.c | |
parent | 5555acc08e6f49afe00cbb8fefd687cb526a7cf2 (diff) | |
download | vim-git-61660eadced09491ef8ee0a7d4af73cc75fdc349.tar.gz |
updated for version 7.0c12v7.0c12
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index bf0372178..790b30ef1 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, ®match) == FAIL) { if (do_error) |