add a selection environement variable to access the last selection content

This commit is contained in:
Maxime Coste 2012-05-07 06:56:53 +00:00
parent ff86d9781d
commit 56efb42962

View File

@ -455,6 +455,9 @@ int main(int argc, char* argv[])
shell_manager.register_env_var("bufname",
[](const Context& context)
{ return context.buffer().name(); });
shell_manager.register_env_var("selection",
[](const Context& context)
{ return context.window().selections_content().back(); });
register_commands();
register_highlighters();
register_filters();