diff -r bbffe4110141 -r 0ea836add01f TextViewer.py --- 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()