diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2020-12-08 18:40:52 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2020-12-08 18:40:52 +0100 |
commit | 74089a908666b18e04d45c418f9eb01e934f0ab1 (patch) | |
tree | 2cd6f4a29c6477fe306ffb534af9530fa717f927 | |
parent | 4383c0f95245d1b98cac28177ade270bf73f008f (diff) | |
download | rneovim-74089a908666b18e04d45c418f9eb01e934f0ab1.tar.gz rneovim-74089a908666b18e04d45c418f9eb01e934f0ab1.tar.bz2 rneovim-74089a908666b18e04d45c418f9eb01e934f0ab1.zip |
fileio: detach buffer when buffer was reloaded (like with :edit)
-rw-r--r-- | src/nvim/fileio.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index ab8072ae1d..f4dd90fad2 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -15,6 +15,7 @@ #include "nvim/ascii.h" #include "nvim/fileio.h" #include "nvim/buffer.h" +#include "nvim/buffer_updates.h" #include "nvim/change.h" #include "nvim/charset.h" #include "nvim/cursor.h" @@ -5082,6 +5083,7 @@ void buf_reload(buf_T *buf, int orig_mode) // Mark all undo states as changed. u_unchanged(curbuf); } + buf_updates_unregister_all(curbuf); } } xfree(ea.cmd); |