aboutsummaryrefslogtreecommitdiffhomepage
path: root/qbuffers.h
diff options
context:
space:
mode:
Diffstat (limited to 'qbuffers.h')
-rw-r--r--qbuffers.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/qbuffers.h b/qbuffers.h
index 9f22ab1..f58ebda 100644
--- a/qbuffers.h
+++ b/qbuffers.h
@@ -154,12 +154,14 @@ public:
gchar *filename;
gint dot;
+ gint savepoint_id;
+
private:
typedef void document;
document *doc;
public:
- Buffer() : filename(NULL), dot(0)
+ Buffer() : filename(NULL), dot(0), savepoint_id(0)
{
doc = (document *)editor_msg(SCI_CREATEDOCUMENT);
}
@@ -227,6 +229,24 @@ extern class Ring {
void run(void);
};
+ class UndoTokenRemoveFile : public UndoToken {
+ gchar *filename;
+
+ public:
+ UndoTokenRemoveFile(const gchar *_filename)
+ : filename(g_strdup(_filename)) {}
+ ~UndoTokenRemoveFile()
+ {
+ g_free(filename);
+ }
+
+ void
+ run(void)
+ {
+ g_unlink(filename);
+ }
+ };
+
LIST_HEAD(Head, Buffer) head;
public: