[gedit-latex/gnome-3-0] Fix insertion of templates.
- From: Jose Aliste <jaliste src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-latex/gnome-3-0] Fix insertion of templates.
- Date: Sun, 3 Jul 2011 22:28:17 +0000 (UTC)
commit 4ec56d70d88c0f5dbf1cd64e2265fecc98f01bdd
Author: Josà Aliste <jaliste src gnome org>
Date: Fri Jul 1 15:33:16 2011 -0400
Fix insertion of templates.
templates should be wrapped around begin_user_action adn end_user_action
to ensure that the undo function in gsv works as expected.
latex/base/templates.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/latex/base/templates.py b/latex/base/templates.py
index eb5e691..55ae6fc 100644
--- a/latex/base/templates.py
+++ b/latex/base/templates.py
@@ -308,7 +308,9 @@ class TemplateDelegate(object):
expression = template.expression.replace("\n", "\n%s" % self._editor.indentation)
self._compiler.compile(expression)
+ self._text_buffer.begin_user_action()
self._do_insert()
+ self._text_buffer.end_user_action()
def _do_insert(self):
if len(self._compiler.placeholders) == 0:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]