Fix edit -readonly
command not setting readonly
option
This commit is contained in:
parent
5696ed02e4
commit
aa6ec5987c
|
@ -393,7 +393,10 @@ void edit(const ParametersParser& parser, Context& context, const ShellContext&)
|
||||||
|
|
||||||
buffer->flags() &= ~Buffer::Flags::NoHooks;
|
buffer->flags() &= ~Buffer::Flags::NoHooks;
|
||||||
if (parser.get_switch("readonly"))
|
if (parser.get_switch("readonly"))
|
||||||
|
{
|
||||||
buffer->flags() |= Buffer::Flags::ReadOnly;
|
buffer->flags() |= Buffer::Flags::ReadOnly;
|
||||||
|
buffer->options()["readonly"].set(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Buffer* current_buffer = context.has_buffer() ? &context.buffer() : nullptr;
|
Buffer* current_buffer = context.has_buffer() ? &context.buffer() : nullptr;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user