From d59b36b8162d38b67ee40e729ad4e4ad6124fd7f Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 4 Feb 2015 21:42:42 +0000 Subject: [PATCH] Fix incorrect Buffer::Change generated in Buffer::reload --- src/buffer.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/buffer.cc b/src/buffer.cc index a3b23c70..a14979dd 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -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()