diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2015-01-06 21:28:39 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2015-01-06 22:15:55 +0100 |
| commit | d3b3e218edcaa950477645a9add92c83cd0543b9 (patch) | |
| tree | 0362222761e8770b241ba4d1ced8dd144bbcfaa9 /text.c | |
| parent | 876b8f94649c9ec405375cf687b55a65e2e666ec (diff) | |
| download | vis-d3b3e218edcaa950477645a9add92c83cd0543b9.tar.gz vis-d3b3e218edcaa950477645a9add92c83cd0543b9.tar.xz | |
Rudimentary change list (accessible via g; and g,)
Diffstat (limited to 'text.c')
| -rw-r--r-- | text.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -1177,6 +1177,18 @@ void text_mark_intern_clear_all(Text *txt) { text_mark_intern_clear(txt, mark); } +size_t text_history_get(Text *txt, size_t index) { + for (Action *a = txt->current_action ? txt->current_action : txt->undo; a; a = a->next) { + if (index-- == 0) { + Change *c = a->change; + while (c && c->next) + c = c->next; + return c ? c->pos : EPOS; + } + } + return EPOS; +} + int text_fd_get(Text *txt) { return txt->fd; } |
