From 49c52b025f2cb5bd66f729f873d2e690b613fb39 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 25 Mar 2018 16:47:19 +1100 Subject: Remove contains_that and use any_of to be closer to the c++ stdlib --- src/normal.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/normal.cc') diff --git a/src/normal.cc b/src/normal.cc index 1845c708..78c4d4df 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -274,7 +274,7 @@ void goto_commands(Context& context, NormalParams params) { auto filename = content(buffer, context.selections().main()); static constexpr char forbidden[] = { '\'', '\\', '\0' }; - if (contains_that(filename, [](char c){ return contains(forbidden, c); })) + if (any_of(filename, [](char c){ return contains(forbidden, c); })) return; auto paths = context.options()["path"].get>(); @@ -670,7 +670,7 @@ void paste(Context& context, NormalParams params) { const char reg = params.reg ? params.reg : '"'; auto strings = RegisterManager::instance()[reg].get(context); - const bool linewise = contains_that(strings, [](StringView str) { + const bool linewise = any_of(strings, [](StringView str) { return not str.empty() and str.back() == '\n'; }); const auto effective_mode = linewise ? adapt_for_linewise(mode) : mode; -- cgit v1.2.3