diff options
| author | Jason Felice <jason.m.felice@gmail.com> | 2018-12-31 12:40:49 -0500 |
|---|---|---|
| committer | Jason Felice <jason.m.felice@gmail.com> | 2020-01-01 19:47:29 -0500 |
| commit | b03b51d27ace58cc17eb8a3aec99fa20dd3209ab (patch) | |
| tree | dc9fa1bcf2d259834f8f31cd4c3c8aac9b816892 /src/main.cc | |
| parent | 62b4780e07e152e037e29823bfd7d911b9767f2e (diff) | |
Add 'history' and 'uncommitted_modifications' expansions
Diffstat (limited to 'src/main.cc')
| -rw-r--r-- | src/main.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.cc b/src/main.cc index 84c88012..621b5350 100644 --- a/src/main.cc +++ b/src/main.cc @@ -309,6 +309,14 @@ static const EnvVarDesc builtin_env_vars[] = { { return format("{} {} {} {}", setup.window_pos.line, setup.window_pos.column, setup.window_range.line, setup.window_range.column); } + }, { + "history", false, + [](StringView name, const Context& context, Quoting quoting) -> String + { return history_as_string(context.buffer().history(), quoting); } + }, { + "uncommitted_modifications", false, + [](StringView name, const Context& context, Quoting quoting) -> String + { return undo_group_as_string(context.buffer().current_undo_group(), quoting); } } }; |
