From 34fa064edcf06d03c16c8a20dde9365d9957523e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sun, 25 Oct 2015 20:49:01 +0100 Subject: vis: convert changelist navigation to proper motions --- editor.c | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'editor.c') diff --git a/editor.c b/editor.c index 3b1f104..e66d929 100644 --- a/editor.c +++ b/editor.c @@ -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); } -- cgit v1.2.3