changeset 675 | 0ea836add01f |
parent 671 | 47b9ad1471cc |
child 684 | f10449b18dbe |
--- a/TextViewer.py Mon Apr 30 16:27:25 2012 +0200 +++ b/TextViewer.py Wed May 02 00:32:15 2012 +0200 @@ -243,6 +243,12 @@ def GetCurrentPos(self): return self.Editor.GetCurrentPos() + def GetState(self): + return {"cursor_pos": self.Editor.GetCurrentPos()} + + def SetState(self, state): + self.Editor.GotoPos(state["cursor_pos"]) + def OnModification(self, event): if not self.DisableEvents: mod_type = event.GetModificationType()