mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 06:28:35 +00:00
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.
This commit is contained in:
@@ -2194,7 +2194,7 @@ static void cmdpreview_restore_state(CpInfo *cpinfo)
|
||||
aco_save_T aco;
|
||||
aucmd_prepbuf(&aco, buf);
|
||||
// Undo invisibly. This also moves the cursor!
|
||||
if (!u_undo_and_forget(count)) {
|
||||
if (!u_undo_and_forget(count, false)) {
|
||||
abort();
|
||||
}
|
||||
aucmd_restbuf(&aco);
|
||||
|
Reference in New Issue
Block a user