summaryrefslogtreecommitdiff
path: root/src/main.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-01-04 18:39:13 +0100
committerMaxime Coste <frrrwww@gmail.com>2013-01-04 18:39:13 +0100
commit4b649d386cb808cfd64a3ebab982d0ecd0813c86 (patch)
treeff0d68ad1131e396f83a960088a246b67f1856b1 /src/main.cc
parentb5418c94caa8d6842780b72b73f353795b3d07dd (diff)
various code style fixes
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/main.cc b/src/main.cc
index 340ef6c4..7cd6155c 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -126,8 +126,8 @@ void do_pipe(Context& context)
Editor& editor = context.editor();
std::vector<String> strings;
- for (auto& sel : const_cast<const Editor&>(context.editor()).selections())
- strings.push_back(ShellManager::instance().pipe(String(sel.begin(), sel.end()),
+ for (auto& sel : context.editor().selections())
+ strings.push_back(ShellManager::instance().pipe({sel.begin(), sel.end()},
cmdline, context, {}, {}));
editor.insert(strings, InsertMode::Replace);
}, context);
@@ -637,13 +637,13 @@ void register_registers()
register_manager.register_dynamic_register('.', [](const Context& context) { return context.editor().selections_content(); });
for (size_t i = 0; i < 10; ++i)
{
- register_manager.register_dynamic_register('0'+i,
- [i](const Context& context) {
- std::vector<String> result;
- for (auto& sel : context.editor().selections())
- result.emplace_back(i < sel.captures().size() ? sel.captures()[i] : "");
- return result;
- });
+ register_manager.register_dynamic_register('0'+i,
+ [i](const Context& context) {
+ std::vector<String> result;
+ for (auto& sel : context.editor().selections())
+ result.emplace_back(i < sel.captures().size() ? sel.captures()[i] : "");
+ return result;
+ });
}
}