diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2015-01-01 19:35:15 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2015-01-01 23:19:58 +0100 |
| commit | acd54f11b21ebcc3eadfbf7d4be14639fac82ca8 (patch) | |
| tree | e1f972e312108d4f08b7f723862b6c49d4b29d47 /editor.h | |
| parent | 819ca3927f6f156d12eeddae4ed84d04d28b7e1b (diff) | |
| download | vis-acd54f11b21ebcc3eadfbf7d4be14639fac82ca8.tar.gz vis-acd54f11b21ebcc3eadfbf7d4be14639fac82ca8.tar.xz | |
Add rudimentary support for jump list (CTRL+{O,I})
Diffstat (limited to 'editor.h')
| -rw-r--r-- | editor.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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*); |
