summaryrefslogtreecommitdiff
path: root/src/normal.cc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2018-03-25 16:47:19 +1100
committerMaxime Coste <mawww@kakoune.org>2018-03-25 16:47:19 +1100
commit49c52b025f2cb5bd66f729f873d2e690b613fb39 (patch)
tree2181f8cc2c43646abbfdc213991028c406d33649 /src/normal.cc
parent435b5b7ff97c7e52d50c002c9480af7066ead2ad (diff)
Remove contains_that and use any_of to be closer to the c++ stdlib
Diffstat (limited to 'src/normal.cc')
-rw-r--r--src/normal.cc4
1 files changed, 2 insertions, 2 deletions
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<Vector<String, MemoryDomain::Options>>();
@@ -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;