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
commit b6723e1ea0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);