summaryrefslogtreecommitdiff
path: root/src/buffer.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-05-14 19:13:52 +0100
committerMaxime Coste <frrrwww@gmail.com>2015-05-14 19:13:52 +0100
commit802d6e106cb6a58ea2b0d4d0c986614e1713f34c (patch)
tree1c67d2519aec5f8ecc4d4a17a441e0d648d7d99f /src/buffer.cc
parente9af3a4217843974c1e9c89bb8ddcfee44216c9e (diff)
Keep hash stored in StringData
Diffstat (limited to 'src/buffer.cc')
-rw-r--r--src/buffer.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buffer.cc b/src/buffer.cc
index be3ca7a2..8b5f6ee5 100644
--- a/src/buffer.cc
+++ b/src/buffer.cc
@@ -180,7 +180,7 @@ void Buffer::reload(BufferLines lines, time_t fs_timestamp)
auto diff = find_diff(m_lines.begin(), m_lines.size(),
lines.begin(), (int)lines.size(),
[](const StringDataPtr& lhs, const StringDataPtr& rhs)
- { return lhs->strview() == rhs->strview(); });
+ { return lhs->hash == rhs->hash and lhs->strview() == rhs->strview(); });
auto it = m_lines.begin();
for (auto& d : diff)