commit f57cc84f75061ee7ad554c555f600faf4b88db51
parent e6d9b5c6167f4d7d0ff137f44d4900da08ec7408
Author: Antoine Amarilli <a3nm@a3nm.net>
Date: Tue, 10 Jul 2012 21:24:30 +0200
reset occurrences environment when using back
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/template.py b/template.py
@@ -262,6 +262,7 @@ class Template:
self.old_position = self.position
self.old_env = copy.deepcopy(self.env)
self.old_femenv = copy.deepcopy(self.femenv)
+ self.old_occenv = copy.deepcopy(self.occenv)
if self.position >= len(self.template):
self.reset_state()
result = self.template[self.position]
@@ -273,6 +274,7 @@ class Template:
self.position = self.old_position
self.env = copy.deepcopy(self.old_env)
self.femenv = copy.deepcopy(self.old_femenv)
+ self.occenv = copy.deepcopy(self.old_occenv)
def check(self, line, ofile=None):
"""Check line (wrapper)"""