summaryrefslogtreecommitdiffstats
path: root/src/fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 180fe3906c..d293d713d3 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4514,10 +4514,7 @@ buf_reload(buf_T *buf, int orig_mode, int reload_options)
// Mark the buffer as unmodified and free undo info.
unchanged(buf, TRUE, TRUE);
if ((flags & READ_KEEP_UNDO) == 0)
- {
- u_blockfree(buf);
- u_clearall(buf);
- }
+ u_clearallandblockfree(buf);
else
{
// Mark all undo states as changed.