summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/commands.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/commands.cc b/src/commands.cc
index 85e45c4b..dd95f0fc 100644
--- a/src/commands.cc
+++ b/src/commands.cc
@@ -393,7 +393,10 @@ void edit(const ParametersParser& parser, Context& context, const ShellContext&)
buffer->flags() &= ~Buffer::Flags::NoHooks;
if (parser.get_switch("readonly"))
+ {
buffer->flags() |= Buffer::Flags::ReadOnly;
+ buffer->options()["readonly"].set(true);
+ }
}
Buffer* current_buffer = context.has_buffer() ? &context.buffer() : nullptr;