From 81bae7262b21b7f19bfaf0de4499a56372ef2a20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sun, 25 Oct 2015 21:04:25 +0100 Subject: vis: convert jumplist navigation to proper motions --- editor.c | 37 ------------------------------------- 1 file changed, 37 deletions(-) (limited to 'editor.c') diff --git a/editor.c b/editor.c index e66d929..8a17805 100644 --- a/editor.c +++ b/editor.c @@ -70,43 +70,6 @@ bool editor_window_split(Win *original) { return true; } -void editor_window_jumplist_add(Win *win, size_t pos) { - Mark mark = text_mark_set(win->file->text, pos); - if (mark && win->jumplist) - ringbuf_add(win->jumplist, mark); -} - -size_t editor_window_jumplist_prev(Win *win) { - size_t cur = view_cursor_get(win->view); - while (win->jumplist) { - Mark mark = ringbuf_prev(win->jumplist); - if (!mark) - return cur; - size_t pos = text_mark_get(win->file->text, mark); - if (pos != EPOS && pos != cur) - return pos; - } - return cur; -} - -size_t editor_window_jumplist_next(Win *win) { - size_t cur = view_cursor_get(win->view); - while (win->jumplist) { - Mark mark = ringbuf_next(win->jumplist); - if (!mark) - return cur; - size_t pos = text_mark_get(win->file->text, mark); - if (pos != EPOS && pos != cur) - return pos; - } - return cur; -} - -void editor_window_jumplist_invalidate(Win *win) { - if (win->jumplist) - ringbuf_invalidate(win->jumplist); -} - void editor_resize(Editor *ed) { ed->ui->resize(ed->ui); } -- cgit v1.2.3