aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-05-18 21:53:20 +0200
committerGitHub <noreply@github.com>2019-05-18 21:53:20 +0200
commit974b43fd7940cd807e5a6b67c77cb2e0462b11a4 (patch)
treea8c3d747d3bca47d5b52758b02de199b83146186 /src/nvim/ex_cmds.c
parent1cbe0145695bea4168b4e23f61e29e51684088e1 (diff)
parentd07a6e2b45175439891beafc5e75f68f92eabd65 (diff)
downloadrneovim-974b43fd7940cd807e5a6b67c77cb2e0462b11a4.tar.gz
rneovim-974b43fd7940cd807e5a6b67c77cb2e0462b11a4.tar.bz2
rneovim-974b43fd7940cd807e5a6b67c77cb2e0462b11a4.zip
Merge #10028 from janlazo/vim-8.1.1345
vim-patch:8.1.{1325,1345,1348,1349}
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r--src/nvim/ex_cmds.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index 560f4e5df2..8436ac810e 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -3819,7 +3819,6 @@ static buf_T *do_sub(exarg_T *eap, proftime_T timeout,
if (!preview || has_second_delim) {
if (subflags.do_count) {
// prevent accidentally changing the buffer by a function
- save_ma = curbuf->b_p_ma;
curbuf->b_p_ma = false;
sandbox++;
}
@@ -3832,13 +3831,9 @@ static buf_T *do_sub(exarg_T *eap, proftime_T timeout,
sub, sub_firstline, false, p_magic, true);
// If getting the substitute string caused an error, don't do
// the replacement.
- if (aborting()) {
- goto skip;
- }
-
// Don't keep flags set by a recursive call
subflags = subflags_save;
- if (subflags.do_count) {
+ if (aborting() || subflags.do_count) {
curbuf->b_p_ma = save_ma;
if (sandbox > 0) {
sandbox--;