diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2014-01-08 19:34:44 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2014-01-08 19:36:18 +0000 |
| commit | 560b4ab0b5551091754bcd331d1ac471c077aaab (patch) | |
| tree | 8930b54b91bb1ac8fc9f42408851748788a08296 /src/buffer.cc | |
| parent | c8119885faff23c8895cf6b278e28059b293e163 (diff) | |
Fix DynamicSelectionList selecting buffer end on Buffer::reload
Diffstat (limited to 'src/buffer.cc')
| -rw-r--r-- | src/buffer.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/buffer.cc b/src/buffer.cc index 3e510422..7bb30165 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -71,8 +71,10 @@ Buffer::~Buffer() void Buffer::reload(std::vector<String> lines, time_t fs_timestamp) { + // use back coord to simulate the persistance of the last end of line + // as buffers are expected to never be empty. for (auto listener : m_change_listeners) - listener->on_erase(*this, {0,0}, end_coord()); + listener->on_erase(*this, {0,0}, back_coord()); m_history.clear(); m_current_undo_group.clear(); @@ -95,7 +97,7 @@ void Buffer::reload(std::vector<String> lines, time_t fs_timestamp) m_fs_timestamp = fs_timestamp; for (auto listener : m_change_listeners) - listener->on_insert(*this, {0,0}, end_coord()); + listener->on_insert(*this, {0,0}, back_coord()); } String Buffer::display_name() const |
