diff --git a/src/buffer_manager.cc b/src/buffer_manager.cc index 688e864a..9826de13 100644 --- a/src/buffer_manager.cc +++ b/src/buffer_manager.cc @@ -79,7 +79,7 @@ void BufferManager::backup_modified_buffers() for (auto& buf : m_buffers) { if ((buf->flags() & Buffer::Flags::File) and buf->is_modified() - and !(buf->flags() & Buffer::Flags::ReadOnly)) + and not (buf->flags() & Buffer::Flags::ReadOnly)) write_buffer_to_backup_file(*buf); } } diff --git a/src/commands.cc b/src/commands.cc index 6104975c..fa61a8c4 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -242,7 +242,7 @@ void write_buffer(const ParametersParser& parser, Context& context, const ShellC // if the buffer is in read-only mode and we try to save it directly // or we try to write to it indirectly using e.g. a symlink, throw an error if ((context.buffer().flags() & Buffer::Flags::ReadOnly) - && (parser.positional_count() == 0 || real_path(parser[0]) == buffer.name())) + and (parser.positional_count() == 0 or real_path(parser[0]) == buffer.name())) throw runtime_error("cannot overwrite the buffer when in readonly mode"); auto filename = parser.positional_count() == 0 ?