diff options
| author | Maxime Coste <mawww@kakoune.org> | 2022-11-06 20:09:38 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2022-11-06 20:09:38 +1100 |
| commit | e67fdf94c66fc7cb0b7a76a15656cabdab4ea460 (patch) | |
| tree | 658b1028bef3675d92bb1ec1326f6d0d7de3f148 /src | |
| parent | e40ee184a66d1ef49ed68b6bc7349417bab938ec (diff) | |
| parent | 84379f446662d20ef23244cabf0df02e6d3251bb (diff) | |
Merge remote-tracking branch 'occivink/add-selection-count-value'
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)}; } |
