Extract variable in selection undo
No functional change.
This commit is contained in:
parent
a50cb5f6e7
commit
02d0584e0f
|
@ -242,10 +242,11 @@ void Context::SelectionHistory::undo()
|
||||||
current_history_node().redo_child = previous_id;
|
current_history_node().redo_child = previous_id;
|
||||||
m_staging = current_history_node();
|
m_staging = current_history_node();
|
||||||
};
|
};
|
||||||
if (&history_node(next).selections.buffer() == &m_context.buffer())
|
Buffer& destination_buffer = history_node(next).selections.buffer();
|
||||||
|
if (&destination_buffer == &m_context.buffer())
|
||||||
select_next();
|
select_next();
|
||||||
else
|
else
|
||||||
m_context.change_buffer(history_node(next).selections.buffer(), { std::move(select_next) });
|
m_context.change_buffer(destination_buffer, { std::move(select_next) });
|
||||||
}
|
}
|
||||||
|
|
||||||
void Context::SelectionHistory::forget_buffer(Buffer& buffer)
|
void Context::SelectionHistory::forget_buffer(Buffer& buffer)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user