diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-09-26 07:15:07 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-26 07:15:07 +0800 |
commit | ac66f5af06ac1f306b0ddb366ba81093508546c4 (patch) | |
tree | 26662b9ac82d8606123d782c9c07b1aeca67cd0c /src/nvim/ex_docmd.c | |
parent | a6c9764edaa349f5f268e5e3bf8b940e137fb5c4 (diff) | |
download | rneovim-ac66f5af06ac1f306b0ddb366ba81093508546c4.tar.gz rneovim-ac66f5af06ac1f306b0ddb366ba81093508546c4.tar.bz2 rneovim-ac66f5af06ac1f306b0ddb366ba81093508546c4.zip |
fix!: make :undo! notify buffer update callbacks (#20344)
When :undo! was introduced to Nvim the implementation of 'inccommand'
preview callback hasn't been fully decided yet, so not notifying buffer
update callbacks made sense for 'inccommand' preview callback in case it
needs to undo the changes itself.
Now it turns out that the undo-and-forget is done automatically for
'inccommand', so it doesn't make sense for :undo! to avoid notifying
buffer update callbacks anymore.
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 085948f7b1..7ece195374 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -5867,7 +5867,7 @@ static void ex_undo(exarg_T *eap) { if (eap->addr_count != 1) { if (eap->forceit) { - u_undo_and_forget(1); // :undo! + u_undo_and_forget(1, true); // :undo! } else { u_undo(1); // :undo } @@ -5894,7 +5894,7 @@ static void ex_undo(exarg_T *eap) emsg(_(e_undobang_cannot_redo_or_move_branch)); return; } - u_undo_and_forget(count); + u_undo_and_forget(count, true); } else { // :undo 123 undo_time(step, false, false, true); } |