aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/undo.c
diff options
context:
space:
mode:
authorThomas Vigouroux <tomvig38@gmail.com>2020-10-02 09:56:57 +0200
committerGitHub <noreply@github.com>2020-10-02 09:56:57 +0200
commitc10c2fab5b4509a7ff50526b56c669f30ebf87c9 (patch)
treecd8f28d2b559959e208f303cf1584934391efc61 /src/nvim/undo.c
parenta9851bfbb1bd442fa4fbe470e1c134a1b6e9b13f (diff)
parentf1b39f91a5be7f3bf61b0e0d129dce49d51ff360 (diff)
downloadrneovim-c10c2fab5b4509a7ff50526b56c669f30ebf87c9.tar.gz
rneovim-c10c2fab5b4509a7ff50526b56c669f30ebf87c9.tar.bz2
rneovim-c10c2fab5b4509a7ff50526b56c669f30ebf87c9.zip
Merge pull request #12968 from erw7/fix-substitute2
fix substitute problem with inccommand
Diffstat (limited to 'src/nvim/undo.c')
-rw-r--r--src/nvim/undo.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c
index 97018f6c02..903e57732f 100644
--- a/src/nvim/undo.c
+++ b/src/nvim/undo.c
@@ -3029,8 +3029,6 @@ u_header_T *u_force_get_undo_header(buf_T *buf)
curbuf = buf;
// Args are tricky: this means replace empty range by empty range..
u_savecommon(0, 1, 1, true);
- curbuf = save_curbuf;
-
uhp = buf->b_u_curhead;
if (!uhp) {
uhp = buf->b_u_newhead;
@@ -3038,6 +3036,7 @@ u_header_T *u_force_get_undo_header(buf_T *buf)
abort();
}
}
+ curbuf = save_curbuf;
}
return uhp;
}