summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-06-07 20:33:34 +0100
committerMaxime Coste <mawww@kakoune.org>2017-06-07 20:33:34 +0100
commitacc2dbf79c4af796edde1a7b564d6d77dac7ce16 (patch)
treeaba66a0ac85b4cfa47659213a420e41c6ef129c3 /src
parent56b52bdb3de2244438433735e04da282c8256b7d (diff)
Move variable closer to its point of use
Diffstat (limited to 'src')
-rw-r--r--src/commands.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/commands.cc b/src/commands.cc
index 790c7c7e..2740d131 100644
--- a/src/commands.cc
+++ b/src/commands.cc
@@ -1545,7 +1545,6 @@ void context_wrap(const ParametersParser& parser, Context& context, Func func)
for (auto& r : parser.get_switch("save-regs").value_or("/\"|^@"))
saved_registers.emplace_back(r, context);
- ClientManager& cm = ClientManager::instance();
if (auto bufnames = parser.get_switch("buffer"))
{
auto context_wrap_for_buffer = [&](Buffer& buffer) {
@@ -1576,6 +1575,7 @@ void context_wrap(const ParametersParser& parser, Context& context, Func func)
return;
}
+ ClientManager& cm = ClientManager::instance();
Context* base_context = &context;
if (auto client_name = parser.get_switch("client"))
base_context = &cm.get_client(*client_name).context();