diff options
| author | Taupiqueur <alexherbo2@gmail.com> | 2021-04-14 02:32:21 +0200 |
|---|---|---|
| committer | Taupiqueur <alexherbo2@gmail.com> | 2021-04-14 02:36:25 +0200 |
| commit | aa6ec5987cbeb73476a88f33607e50ff7c4e49f6 (patch) | |
| tree | b4ebc82e66fd07e9adc3fecef99675d68135b0e5 /src | |
| parent | 5696ed02e49cb9ba076a9a8ce908597720e7df1c (diff) | |
Fix `edit -readonly` command not setting `readonly` option
Diffstat (limited to 'src')
| -rw-r--r-- | src/commands.cc | 3 |
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; |
