use directly context.client() for getting the kak_client env var value

This commit is contained in:
Maxime Coste 2013-09-12 23:49:08 +02:00
parent 823812fd1a
commit fd021de7d7

View File

@ -95,7 +95,7 @@ void register_env_vars()
{ return Server::instance().filename(); }); { return Server::instance().filename(); });
shell_manager.register_env_var("client", shell_manager.register_env_var("client",
[](const String& name, const Context& context) [](const String& name, const Context& context)
{ return ClientManager::instance().get_client(context).name(); }); { return context.client().name(); });
shell_manager.register_env_var("cursor_line", shell_manager.register_env_var("cursor_line",
[](const String& name, const Context& context) [](const String& name, const Context& context)
{ return to_string(context.editor().main_selection().last().line + 1); }); { return to_string(context.editor().main_selection().last().line + 1); });