From 049b9a28d191285e56c21faa143b4f1a43007b70 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 28 May 2021 20:31:28 +1000 Subject: [PATCH] Fix File Buffer flag not being correctly applied --- src/buffer_utils.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/buffer_utils.cc b/src/buffer_utils.cc index e9f159d6..a48a9ce9 100644 --- a/src/buffer_utils.cc +++ b/src/buffer_utils.cc @@ -147,7 +147,8 @@ decltype(auto) parse_file(StringView filename, Func&& func) Buffer* open_file_buffer(StringView filename, Buffer::Flags flags) { return parse_file(filename, [&](BufferLines&& lines, ByteOrderMark bom, EolFormat eolformat, FsStatus fs_status) { - return BufferManager::instance().create_buffer(filename.str(), flags, std::move(lines), bom, eolformat, fs_status); + return BufferManager::instance().create_buffer(filename.str(), Buffer::Flags::File | flags, + std::move(lines), bom, eolformat, fs_status); }); }