diff --git a/src/buffer.cc b/src/buffer.cc index 9c38605a..ffb45e18 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -47,6 +47,7 @@ Buffer::Buffer(String name, Flags flags, BufferLines lines, options().get_local_option("eolformat").set(eolformat); options().get_local_option("BOM").set(bom); + options().get_local_option("readonly").set((bool)(flags & Flags::ReadOnly)); // now we may begin to record undo data if (not (flags & Flags::NoUndo))