diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-11-14 02:50:17 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-11-14 02:50:17 +0100 |
commit | 56c58144b1ed4f0a145c5572944e1fb2a165a45a (patch) | |
tree | 5124204c4b09bdb8c9e7b4615cf02c11ef9a650a /qbuffers.h | |
parent | 66bde3c43d543cbadd617f68240f4bd8c22d10d9 (diff) | |
download | sciteco-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.h | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -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: |