add a selection environement variable to access the last selection content
This commit is contained in:
parent
ff86d9781d
commit
56efb42962
|
@ -455,6 +455,9 @@ int main(int argc, char* argv[])
|
||||||
shell_manager.register_env_var("bufname",
|
shell_manager.register_env_var("bufname",
|
||||||
[](const Context& context)
|
[](const Context& context)
|
||||||
{ return context.buffer().name(); });
|
{ return context.buffer().name(); });
|
||||||
|
shell_manager.register_env_var("selection",
|
||||||
|
[](const Context& context)
|
||||||
|
{ return context.window().selections_content().back(); });
|
||||||
register_commands();
|
register_commands();
|
||||||
register_highlighters();
|
register_highlighters();
|
||||||
register_filters();
|
register_filters();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user