aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/interface.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2014-11-24 05:50:25 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2014-11-24 05:58:27 +0100
commite030c4e574de9350024fba415450a0017fe48b56 (patch)
treed2eb0d69b69ad84b173c496b9c28792fdf80e381 /src/interface.h
parent70776212a69ce374b16baa108a21accd0921589d (diff)
downloadsciteco-e030c4e574de9350024fba415450a0017fe48b56.tar.gz
turn off Scintilla undo collection by default and fixed memleak
* in batch mode, Scintilla undo actions are simply leaked memory * Since we have more than one Scintilla view now, we must empty the undo buffer of all scintilla views when a command line is committed ($$)
Diffstat (limited to 'src/interface.h')
-rw-r--r--src/interface.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/interface.h b/src/interface.h
index a883a5f..4b5de7f 100644
--- a/src/interface.h
+++ b/src/interface.h
@@ -131,6 +131,13 @@ public:
undo.push(new UndoTokenSetRepresentations(impl()));
}
+ inline void
+ set_scintilla_undo(bool state)
+ {
+ ssm(SCI_EMPTYUNDOBUFFER);
+ ssm(SCI_SETUNDOCOLLECTION, state);
+ }
+
protected:
void setup(void);
};