From acd54f11b21ebcc3eadfbf7d4be14639fac82ca8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 1 Jan 2015 19:35:15 +0100 Subject: Add rudimentary support for jump list (CTRL+{O,I}) --- editor.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'editor.h') diff --git a/editor.h b/editor.h index 206d3ea..5dcb122 100644 --- a/editor.h +++ b/editor.h @@ -8,6 +8,7 @@ #include "register.h" #include "macro.h" #include "syntax.h" +#include "ring-buffer.h" typedef struct Editor Editor; typedef struct EditorWin EditorWin; @@ -16,6 +17,7 @@ struct EditorWin { Editor *editor; /* editor instance to which this window belongs */ Text *text; /* underlying text management */ Win *win; /* window for the text area */ + RingBuffer *jumplist; /* LRU jump management */ WINDOW *statuswin; /* curses window for the statusbar */ int width, height; /* window size including the statusbar */ EditorWin *prev, *next; /* neighbouring windows */ @@ -150,6 +152,11 @@ bool editor_window_split(EditorWin*); /* focus the next / previous window */ void editor_window_next(Editor*); void editor_window_prev(Editor*); + +void editor_window_jumplist_add(EditorWin*, size_t pos); +size_t editor_window_jumplist_prev(EditorWin*); +size_t editor_window_jumplist_next(EditorWin*); +void editor_window_jumplist_invalidate(EditorWin*); /* rearrange all windows either vertically or horizontally */ void editor_windows_arrange_vertical(Editor*); void editor_windows_arrange_horizontal(Editor*); -- cgit v1.2.3