From 56efb4296223f91953c0d5c748643d35764c03a6 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 7 May 2012 06:56:53 +0000 Subject: [PATCH] add a selection environement variable to access the last selection content --- src/main.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.cc b/src/main.cc index d3afc0af..39f5a4ec 100644 --- a/src/main.cc +++ b/src/main.cc @@ -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();