From 023c8afb73c28755e9aa426418aeab163775ad89 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 11 Mar 2015 13:58:42 +0000 Subject: [PATCH] Fix unneeded string copy --- src/buffer.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/buffer.cc b/src/buffer.cc index 34b636f7..fe162486 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -166,7 +166,8 @@ void Buffer::reload(BufferLines lines, time_t fs_timestamp) { for (auto line = line_count()-1; line >= 0; --line) m_current_undo_group.emplace_back( - Modification::Erase, line, m_lines[line]); + Modification::Erase, line, + SharedString{m_lines.get_storage(line)}); } if (lines.empty())