From e030c4e574de9350024fba415450a0017fe48b56 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Mon, 24 Nov 2014 05:50:25 +0100 Subject: 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 ($$) --- src/interface.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/interface.h') 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); }; -- cgit v1.2.3