diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2015-10-25 20:49:01 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2015-10-25 22:46:43 +0100 |
| commit | 34fa064edcf06d03c16c8a20dde9365d9957523e (patch) | |
| tree | 91c3e4370a7121ad0b99c76528625f7ceeca3c65 /editor.c | |
| parent | fbb9265b95ab46824b7bc01621a01eb6a2362000 (diff) | |
| download | vis-34fa064edcf06d03c16c8a20dde9365d9957523e.tar.gz vis-34fa064edcf06d03c16c8a20dde9365d9957523e.tar.xz | |
vis: convert changelist navigation to proper motions
Diffstat (limited to 'editor.c')
| -rw-r--r-- | editor.c | 28 |
1 files changed, 0 insertions, 28 deletions
@@ -107,34 +107,6 @@ void editor_window_jumplist_invalidate(Win *win) { ringbuf_invalidate(win->jumplist); } -size_t editor_window_changelist_prev(Win *win) { - size_t pos = view_cursor_get(win->view); - if (pos != win->changelist.pos) - win->changelist.index = 0; - else - win->changelist.index++; - size_t newpos = text_history_get(win->file->text, win->changelist.index); - if (newpos == EPOS) - win->changelist.index--; - else - win->changelist.pos = newpos; - return win->changelist.pos; -} - -size_t editor_window_changelist_next(Win *win) { - size_t pos = view_cursor_get(win->view); - if (pos != win->changelist.pos) - win->changelist.index = 0; - else if (win->changelist.index > 0) - win->changelist.index--; - size_t newpos = text_history_get(win->file->text, win->changelist.index); - if (newpos == EPOS) - win->changelist.index++; - else - win->changelist.pos = newpos; - return win->changelist.pos; -} - void editor_resize(Editor *ed) { ed->ui->resize(ed->ui); } |
