aboutsummaryrefslogtreecommitdiffhomepage
path: root/qbuffers.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-18 01:05:37 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-18 01:05:37 +0100
commit9be9fcca0c9ab63180a2e9aeb64e25829034b7a4 (patch)
tree94cd667c59f75551921e988bdfd1edbaa4a3d946 /qbuffers.h
parented6d0bdbf4b69061dd5db69d823c2ee39b98dcdd (diff)
downloadsciteco-9be9fcca0c9ab63180a2e9aeb64e25829034b7a4.tar.gz
avoid using Scintilla's SAVEPOINT mechanism altogether: fixes some destructive commands
* the only thing gained from (partially) using that mechanism is that no explicit calls to set the dirty-status of a buffer are necessary * however it had many disadvantages: * setting the buffer clean had to be done manually anyway (see previous commits) * when changing Q-Registers without affecting the current document, a flag had to be used to prevent setting the current document dirty * last but not least, it introduced a dependency on the order of the destructive operation and its UNDO token. * the UNDO token could trigger a SAVEPOINTLEFT notification resulting in additional rubout tokens to be pushed on the stack which screws the rubout stack. this can be avoided by clever ordering of the operations * using an explicit ring.dirtify() is therefore much better
Diffstat (limited to 'qbuffers.h')
-rw-r--r--qbuffers.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/qbuffers.h b/qbuffers.h
index 960534d..2eea797 100644
--- a/qbuffers.h
+++ b/qbuffers.h
@@ -164,7 +164,6 @@ public:
gint savepoint_id;
- /* set by Interfaces using Scintilla notifications */
bool dirty;
private:
@@ -280,6 +279,7 @@ public:
Buffer *find(const gchar *filename);
+ void dirtify(void);
bool is_any_dirty(void);
bool edit(const gchar *filename);
@@ -372,6 +372,4 @@ namespace States {
extern StateCopyToQReg copytoqreg;
}
-extern bool dirty_check_enabled;
-
#endif