aboutsummaryrefslogtreecommitdiff
path: root/editor.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2015-10-25 21:04:25 +0100
committerMarc André Tanner <mat@brain-dump.org>2015-10-25 22:46:43 +0100
commit81bae7262b21b7f19bfaf0de4499a56372ef2a20 (patch)
tree52b54f2b04c8e3328f61d7f6962182d819234264 /editor.c
parent34fa064edcf06d03c16c8a20dde9365d9957523e (diff)
downloadvis-81bae7262b21b7f19bfaf0de4499a56372ef2a20.tar.gz
vis-81bae7262b21b7f19bfaf0de4499a56372ef2a20.tar.xz
vis: convert jumplist navigation to proper motions
Diffstat (limited to 'editor.c')
-rw-r--r--editor.c37
1 files changed, 0 insertions, 37 deletions
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);
}