parent
d17bed9b80
commit
33eb93b619
|
@ -523,9 +523,10 @@ void cycle_buffer(const ParametersParser& parser, Context& context, const ShellC
|
|||
auto it = find_if(BufferManager::instance(),
|
||||
[oldbuf](const std::unique_ptr<Buffer>& lhs)
|
||||
{ return lhs.get() == oldbuf; });
|
||||
|
||||
kak_assert(it != BufferManager::instance().end());
|
||||
|
||||
Buffer* newbuf = nullptr;
|
||||
auto cycle = [&] {
|
||||
if (not next)
|
||||
{
|
||||
if (it == BufferManager::instance().begin())
|
||||
|
@ -537,8 +538,11 @@ void cycle_buffer(const ParametersParser& parser, Context& context, const ShellC
|
|||
if (++it == BufferManager::instance().end())
|
||||
it = BufferManager::instance().begin();
|
||||
}
|
||||
|
||||
Buffer* newbuf = it->get();
|
||||
newbuf = it->get();
|
||||
};
|
||||
cycle();
|
||||
if (newbuf->flags() & Buffer::Flags::Debug)
|
||||
cycle();
|
||||
|
||||
if (newbuf != oldbuf)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user