aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Vigouroux <tomvig38@gmail.com>2021-07-08 23:08:42 +0200
committerThomas Vigouroux <tomvig38@gmail.com>2021-07-08 23:08:42 +0200
commit9c93e6461c8c6ec2e8d3e73f506389ac7086d531 (patch)
tree657b291a8ddc915441dd3049897a669aff8cdf41 /src
parentb35fefc57ff408246a4652c92d6ef0dbf36d529c (diff)
downloadrneovim-9c93e6461c8c6ec2e8d3e73f506389ac7086d531.tar.gz
rneovim-9c93e6461c8c6ec2e8d3e73f506389ac7086d531.tar.bz2
rneovim-9c93e6461c8c6ec2e8d3e73f506389ac7086d531.zip
refactor(undo): remove last occurence of save_curbuf
Diffstat (limited to 'src')
-rw-r--r--src/nvim/undo.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c
index 6abb045264..d561ca5b83 100644
--- a/src/nvim/undo.c
+++ b/src/nvim/undo.c
@@ -3173,11 +3173,8 @@ u_header_T *u_force_get_undo_header(buf_T *buf)
if (!uhp) {
// Undo is normally invoked in change code, which already has swapped
// curbuf.
- buf_T *save_curbuf = curbuf;
- curbuf = buf;
// Args are tricky: this means replace empty range by empty range..
u_savecommon(curbuf, 0, 1, 1, true);
- curbuf = save_curbuf;
uhp = buf->b_u_curhead;
if (!uhp) {
@@ -3186,7 +3183,6 @@ u_header_T *u_force_get_undo_header(buf_T *buf)
abort();
}
}
- curbuf = save_curbuf;
}
return uhp;
}