Merge pull request #13486 from bfredl/bufnoreload

fileio: detach buffer when buffer was reloaded (like with :edit)
This commit is contained in:
Björn Linse
2020-12-12 09:55:49 +01:00
committed by GitHub

View File

@@ -15,6 +15,7 @@
#include "nvim/ascii.h" #include "nvim/ascii.h"
#include "nvim/fileio.h" #include "nvim/fileio.h"
#include "nvim/buffer.h" #include "nvim/buffer.h"
#include "nvim/buffer_updates.h"
#include "nvim/change.h" #include "nvim/change.h"
#include "nvim/charset.h" #include "nvim/charset.h"
#include "nvim/cursor.h" #include "nvim/cursor.h"
@@ -5082,6 +5083,7 @@ void buf_reload(buf_T *buf, int orig_mode)
// Mark all undo states as changed. // Mark all undo states as changed.
u_unchanged(curbuf); u_unchanged(curbuf);
} }
buf_updates_unregister_all(curbuf);
} }
} }
xfree(ea.cmd); xfree(ea.cmd);