aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ring.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ring.h')
-rw-r--r--src/ring.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/ring.h b/src/ring.h
index 6466a69..1b1727e 100644
--- a/src/ring.h
+++ b/src/ring.h
@@ -25,13 +25,26 @@
#include "parser.h"
#include "list.h"
+typedef enum {
+ TECO_BUFFER_CLEAN = 0,
+ /** buffer modified */
+ TECO_BUFFER_DIRTY,
+ /** modified and backup already written */
+ TECO_BUFFER_DIRTY_BACKEDUP
+} teco_buffer_state_t;
+
typedef struct teco_buffer_t {
teco_tailq_entry_t entry;
teco_view_t *view;
gchar *filename;
- gboolean dirty;
+
+ /**
+ * A teco_buffer_state_t.
+ * This is still a guint, so you can call teco_undo_guint().
+ */
+ guint state;
} teco_buffer_t;
/** @memberof teco_buffer_t */
@@ -70,6 +83,10 @@ void teco_ring_dirtify(void);
guint teco_ring_get_first_dirty(void);
gboolean teco_ring_save_all_dirty_buffers(GError **error);
+extern guint teco_ring_backup_interval;
+
+void teco_ring_backup(void);
+
gboolean teco_ring_edit_by_name(const gchar *filename, GError **error);
gboolean teco_ring_edit_by_id(teco_int_t id, GError **error);