From d3b3e218edcaa950477645a9add92c83cd0543b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Tue, 6 Jan 2015 21:28:39 +0100 Subject: Rudimentary change list (accessible via g; and g,) --- editor.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'editor.h') diff --git a/editor.h b/editor.h index 2cc097f..2be3fa6 100644 --- a/editor.h +++ b/editor.h @@ -13,11 +13,17 @@ typedef struct Editor Editor; typedef struct EditorWin EditorWin; +typedef struct { + size_t index; /* #number of changes */ + size_t pos; /* where the current change occured */ +} ChangeList; + 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 */ + ChangeList changelist; /* state for iterating through least recently changes */ WINDOW *statuswin; /* curses window for the statusbar */ int width, height; /* window size including the statusbar */ EditorWin *prev, *next; /* neighbouring windows */ @@ -158,6 +164,9 @@ 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*); + +size_t editor_window_changelist_prev(EditorWin*); +size_t editor_window_changelist_next(EditorWin*); /* rearrange all windows either vertically or horizontally */ void editor_windows_arrange_vertical(Editor*); void editor_windows_arrange_horizontal(Editor*); -- cgit v1.2.3