aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/qregisters.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2014-11-16 23:29:34 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2014-11-16 23:34:25 +0100
commit52db2f4e20d7c544d3040af1f359dd3365ca204b (patch)
tree5f1d9ae0e9673215a2cb99965943e4ed93e50850 /src/qregisters.h
parent38fcf6d15cdf09591e7d7a142ad724164875e433 (diff)
downloadsciteco-52db2f4e20d7c544d3040af1f359dd3365ca204b.tar.gz
cleaned up Scintilla document "updating"
* allowed me to remove some obscure global functions and methods like QRegister::update_string(). * Document updating is concentrated in qregisters.cpp now * also fixes some bugs introduced earlier, like undo tokens being generated for non-undo registers (resulting in segfaults on rubout)
Diffstat (limited to 'src/qregisters.h')
-rw-r--r--src/qregisters.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/qregisters.h b/src/qregisters.h
index e0e8520..3d89c4a 100644
--- a/src/qregisters.h
+++ b/src/qregisters.h
@@ -64,7 +64,12 @@ protected:
public:
/*
- * whether to generate UndoTokens (unnecessary in macro invocations)
+ * Whether to generate UndoTokens (unnecessary in macro invocations).
+ *
+ * FIXME: Every QRegister has this field, but it only differs
+ * between local and global QRegisters. This wastes space.
+ * There must be a more clever way to inherit this property, e.g.
+ * by setting QRegisters::current_must_undo.
*/
bool must_undo;
@@ -88,12 +93,6 @@ public:
return integer;
}
- inline void
- update_string()
- {
- string.update(QRegisters::view);
- }
-
virtual void set_string(const gchar *str);
virtual void undo_set_string(void);
virtual void append_string(const gchar *str);
@@ -104,9 +103,11 @@ public:
}
virtual gchar *get_string(void);
- virtual void edit(void);
- virtual void undo_edit(void);
-
+ /*
+ * The QRegisterStack must currently access the
+ * integer and string fields directly to exchange
+ * data efficiently.
+ */
friend class QRegisterStack;
};
@@ -441,8 +442,6 @@ namespace QRegisters {
extern QRegisterTable *locals;
extern QRegister *current;
- void undo_edit(void);
-
enum Hook {
HOOK_ADD = 1,
HOOK_EDIT,