summaryrefslogtreecommitdiff
path: root/src/insert_completer.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2016-02-28 18:30:35 +0000
committerMaxime Coste <frrrwww@gmail.com>2016-02-28 18:30:35 +0000
commit548e10597c7145babb7b68cf3bf42a4c6ed81ec9 (patch)
tree6be96c28de426fb78f0240e3caac608a3e1ac024 /src/insert_completer.cc
parentaa39380f4b627563a3b3c3e4940f775b86272a7c (diff)
Code cleanup
Diffstat (limited to 'src/insert_completer.cc')
-rw-r--r--src/insert_completer.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/insert_completer.cc b/src/insert_completer.cc
index 5a4464bb..27275363 100644
--- a/src/insert_completer.cc
+++ b/src/insert_completer.cc
@@ -241,9 +241,8 @@ InsertCompletion complete_option(const Buffer& buffer, ByteCoord cursor_pos,
}
size_t timestamp = (size_t)str_to_int({match[4].first, match[4].second});
auto changes = buffer.changes_since(timestamp);
- if (find_if(changes, [&](const Buffer::Change& change){
- return change.begin < coord;
- }) != changes.end())
+ if (contains_that(changes, [&](const Buffer::Change& change)
+ { return change.begin < coord; }))
return {};
if (cursor_pos.line == coord.line and cursor_pos.column >= coord.column)