diff options
| author | Philipp Jungkamp <p.jungkamp@gmx.net> | 2025-07-05 00:24:54 +0200 |
|---|---|---|
| committer | Philipp Jungkamp <p.jungkamp@gmx.net> | 2025-07-05 00:24:54 +0200 |
| commit | 2eb6aa9e20901c53ec7c288d47592043649b1bbd (patch) | |
| tree | 743d84905db6fc0bf578654528fdb7be93375ad9 /doc/pages | |
| parent | c24c802373fc223fb80f1b80419ce6dcc59f2836 (diff) | |
Introduce `history_since_<id>` value expansion
The `history_since_<id>` value expansion allows incremental parsing of a
buffer's history.
declare-option int my_last_history_id
define-command my-process-history ...
# process the initial buffer history
my-process-history %val{bufname} 0 %val{history}
set-option buffer my_last_history_id 0
# only process new history changes on idle
hook buffer NormalIdle %{
evaluate-commands %exp{
my-process-history \
%%val{bufname} \
%%opt{my_last_history_id} \
%%val{history_since_%opt{my_last_history_id}}
}
set-option buffer my_last_history_id %val{history_id}
}
Diffstat (limited to 'doc/pages')
| -rw-r--r-- | doc/pages/expansions.asciidoc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/pages/expansions.asciidoc b/doc/pages/expansions.asciidoc index cf55902f..37e5811c 100644 --- a/doc/pages/expansions.asciidoc +++ b/doc/pages/expansions.asciidoc @@ -305,6 +305,11 @@ The following expansions are supported (with required context _in italics_): history), and each _modification_ is presented as in `%val{uncommitted_modifications}`. +*%val{history_since_id}*:: + _in buffer, window scope_ + + a partial history of the buffer in the same format as `%val{history}` + starting after entry _id_ + *%val{history_id}*:: _in buffer, window scope_ + history id of the current buffer, an integer value which refers to a |
