mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-26 13:02:01 +03:00
Small code style tweak
This commit is contained in:
parent
c308cddcd8
commit
bf66302d29
@ -1572,13 +1572,10 @@ void context_wrap(const ParametersParser& parser, Context& context, Func func)
|
||||
};
|
||||
if (*bufnames == "*")
|
||||
{
|
||||
// copy buffer list as we might be mutating the buffer list
|
||||
// in the loop.
|
||||
auto ptrs = BufferManager::instance() |
|
||||
transform(std::mem_fn(&std::unique_ptr<Buffer>::get)) |
|
||||
filter([](Buffer* buf) { return not (buf->flags() & Buffer::Flags::Debug); });
|
||||
Vector<SafePtr<Buffer>> buffers{ptrs.begin(), ptrs.end()};
|
||||
for (auto buffer : buffers)
|
||||
for (auto&& buffer : BufferManager::instance()
|
||||
| transform(std::mem_fn(&std::unique_ptr<Buffer>::get))
|
||||
| filter([](Buffer* buf) { return not (buf->flags() & Buffer::Flags::Debug); })
|
||||
| gather<Vector<SafePtr<Buffer>>>()) // gather as we might be mutating the buffer list in the loop.
|
||||
context_wrap_for_buffer(*buffer);
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user