aboutsummaryrefslogtreecommitdiff
path: root/editor.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2015-01-06 21:28:39 +0100
committerMarc André Tanner <mat@brain-dump.org>2015-01-06 22:15:55 +0100
commitd3b3e218edcaa950477645a9add92c83cd0543b9 (patch)
tree0362222761e8770b241ba4d1ced8dd144bbcfaa9 /editor.h
parent876b8f94649c9ec405375cf687b55a65e2e666ec (diff)
downloadvis-d3b3e218edcaa950477645a9add92c83cd0543b9.tar.gz
vis-d3b3e218edcaa950477645a9add92c83cd0543b9.tar.xz
Rudimentary change list (accessible via g; and g,)
Diffstat (limited to 'editor.h')
-rw-r--r--editor.h9
1 files changed, 9 insertions, 0 deletions
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*);