summaryrefslogtreecommitdiff
path: root/src/ex_cmds.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-05-20 20:34:51 +0200
committerBram Moolenaar <Bram@vim.org>2019-05-20 20:34:51 +0200
commit80341bcd89764d96f87859a3aac8bc00aad1d762 (patch)
treee7ed467633df5576a27ffb6c9f35d7d03a57a8b7 /src/ex_cmds.c
parentf3333b02f34526da46cdae608f7e2d869bb8c654 (diff)
downloadvim-git-80341bcd89764d96f87859a3aac8bc00aad1d762.tar.gz
patch 8.1.1360: buffer left 'nomodifiable' after :substitutev8.1.1360
Problem: Buffer left 'nomodifiable' after :substitute. (Ingo Karkat) Solution: Save the value of 'modifiable' earlier' (Christian Brabandt, closes #4403)
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r--src/ex_cmds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index df5dcd01f..0174fd6b0 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -5557,6 +5557,7 @@ do_sub(exarg_T *eap)
* 3. substitute the string.
*/
#ifdef FEAT_EVAL
+ save_ma = curbuf->b_p_ma;
if (subflags.do_count)
{
// prevent accidentally changing the buffer by a function
@@ -5566,7 +5567,6 @@ do_sub(exarg_T *eap)
// Save flags for recursion. They can change for e.g.
// :s/^/\=execute("s#^##gn")
subflags_save = subflags;
- save_ma = curbuf->b_p_ma;
#endif
// get length of substitution part
sublen = vim_regsub_multi(&regmatch,