Mercurial > vim
diff src/ex_cmds.c @ 16716:5a541d459ef7 v8.1.1360
patch 8.1.1360: buffer left 'nomodifiable' after :substitute
commit https://github.com/vim/vim/commit/80341bcd89764d96f87859a3aac8bc00aad1d762
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon May 20 20:34:51 2019 +0200
patch 8.1.1360: buffer left 'nomodifiable' after :substitute
Problem: Buffer left 'nomodifiable' after :substitute. (Ingo Karkat)
Solution: Save the value of 'modifiable' earlier' (Christian Brabandt,
closes #4403)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 20 May 2019 20:45:06 +0200 |
parents | ba592f30c082 |
children | b52ea9c5f1db |
line wrap: on
line diff
--- 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(®match,