Fix incorrect Buffer::Change generated in Buffer::reload

This commit is contained in:
Maxime Coste 2015-02-04 21:42:42 +00:00
parent 8fb4277343
commit d59b36b816

View File

@ -158,7 +158,7 @@ struct Buffer::Modification
void Buffer::reload(BufferLines lines, time_t fs_timestamp)
{
m_changes.push_back({ Change::Erase, true, {0,0}, back_coord() });
m_changes.push_back({ Change::Erase, true, {0,0}, line_count() });
commit_undo_group();
if (not (m_flags & Flags::NoUndo))
@ -186,7 +186,7 @@ void Buffer::reload(BufferLines lines, time_t fs_timestamp)
m_last_save_undo_index = m_history_cursor - m_history.begin();
m_fs_timestamp = fs_timestamp;
m_changes.push_back({ Change::Insert, true, {0,0}, back_coord() });
m_changes.push_back({ Change::Insert, true, {0,0}, line_count() });
}
void Buffer::commit_undo_group()