summaryrefslogtreecommitdiff
path: root/src/main.cc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2025-07-08 10:25:35 +1000
committerMaxime Coste <mawww@kakoune.org>2025-07-08 10:25:35 +1000
commit2823c5e94c1bad72a7a22ea37452d2390d5b1e17 (patch)
treef96871dd6d5387d30a2ea64e2b6b36cb4112092c /src/main.cc
parent2a9941c9a01597626135708cbc4566db5691489c (diff)
parent2eb6aa9e20901c53ec7c288d47592043649b1bbd (diff)
Merge remote-tracking branch 'pjungkamp/history'
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.cc b/src/main.cc
index 0a2e68b0..60c0669e 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -315,6 +315,13 @@ static const EnvVarDesc builtin_env_vars[] = { {
[](StringView name, const Context& context) -> Vector<String>
{ return history_as_strings(context.buffer().history()); }
}, {
+ "history_since_", true,
+ [](StringView name, const Context& context) -> Vector<String>
+ { return history_as_strings(
+ ArrayView(context.buffer().history())
+ .subrange(str_to_int(name.substr(14_byte)) + 1)
+ ); }
+ }, {
"uncommitted_modifications", false,
[](StringView name, const Context& context) -> Vector<String>
{ return undo_group_as_strings(context.buffer().current_undo_group()); }