mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
vim-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 vim/vim#4403)
80341bcd89
This commit is contained in:
@@ -3817,6 +3817,7 @@ static buf_T *do_sub(exarg_T *eap, proftime_T timeout,
|
||||
// 3. Substitute the string. During 'inccommand' preview only do this if
|
||||
// there is a replace pattern.
|
||||
if (!preview || has_second_delim) {
|
||||
save_ma = curbuf->b_p_ma;
|
||||
if (subflags.do_count) {
|
||||
// prevent accidentally changing the buffer by a function
|
||||
curbuf->b_p_ma = false;
|
||||
|
Reference in New Issue
Block a user