diff options
| author | Olivier Perret <Olivier.Perret@mailbox.org> | 2022-11-04 19:16:38 +0100 |
|---|---|---|
| committer | Olivier Perret <Olivier.Perret@mailbox.org> | 2022-11-04 19:16:38 +0100 |
| commit | 84379f446662d20ef23244cabf0df02e6d3251bb (patch) | |
| tree | d948f06174cf3c9eaa3c5f7cf0b99d5bfcd5271f /src | |
| parent | dcdafdea778cc74545d7daaab8b70a6bf200001b (diff) | |
Add a %val{selection_count} expansion
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.cc b/src/main.cc index 08baed94..2b09ccd6 100644 --- a/src/main.cc +++ b/src/main.cc @@ -350,6 +350,10 @@ static const EnvVarDesc builtin_env_vars[] = { { return to_string(char_length(context.buffer(), s)); }) | gather<Vector<String>>(); } }, { + "selection_count", false, + [](StringView name, const Context& context) -> Vector<String> + { return {to_string(context.selections().size())}; } + }, { "window_width", false, [](StringView name, const Context& context) -> Vector<String> { return {to_string(context.window().dimensions().column)}; } |
