Commit 2eb6aa9
committed
Introduce
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}
}history_since_<id> value expansion1 parent c24c802 commit 2eb6aa9
File tree
4 files changed
+14
-2
lines changed- doc/pages
- src
4 files changed
+14
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
308 | 313 | | |
309 | 314 | | |
310 | 315 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
395 | | - | |
| 395 | + | |
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
415 | 422 | | |
416 | 423 | | |
417 | 424 | | |
| |||
0 commit comments