[gedit-latex] Fix insertion of templates.
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-latex] Fix insertion of templates.
- Date: Mon, 4 Jul 2011 09:54:22 +0000 (UTC)
commit 71efc879c15c75fdcddd0444347f8d9404320589
Author: Josà Aliste <jaliste src gnome org>
Date: Mon Jul 4 11:54:10 2011 +0200
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 f39b6ae..5b1de69 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]