do not store a change operation with no change units
This commit is contained in:
parent
2057c69585
commit
cac339a9f2
@ -354,14 +354,17 @@ void Buffer::save_current_operation()
|
||||
{
|
||||
if (m_current_change_operation)
|
||||
{
|
||||
size_t new_change_operation_index = m_change_operations.size();
|
||||
if (m_current_change_operation_index < new_change_operation_index)
|
||||
if (m_current_change_operation->changes.size() > 0u)
|
||||
{
|
||||
m_change_operations[m_current_change_operation_index]->children.push_back(new_change_operation_index);
|
||||
size_t new_change_operation_index = m_change_operations.size();
|
||||
if (m_current_change_operation_index < new_change_operation_index)
|
||||
{
|
||||
m_change_operations[m_current_change_operation_index]->children.push_back(new_change_operation_index);
|
||||
}
|
||||
m_change_operations.push_back(m_current_change_operation);
|
||||
m_current_change_operation_index = new_change_operation_index;
|
||||
}
|
||||
m_change_operations.push_back(m_current_change_operation);
|
||||
m_current_change_operation = nullptr;
|
||||
m_current_change_operation_index = new_change_operation_index;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user