aboutsummaryrefslogtreecommitdiffhomepage
path: root/qbuffers.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-14 02:50:17 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-14 02:50:17 +0100
commit56c58144b1ed4f0a145c5572944e1fb2a165a45a (patch)
tree5124204c4b09bdb8c9e7b4615cf02c11ef9a650a /qbuffers.h
parent66bde3c43d543cbadd617f68240f4bd8c22d10d9 (diff)
downloadsciteco-56c58144b1ed4f0a145c5572944e1fb2a165a45a.tar.gz
support rubout for EW command: if in undo mode, a save point is created so the file can be replaced or removed when rubbing out EW
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: