diff -r 37882f34f9cb -r f10449b18dbe TextViewer.py --- a/TextViewer.py Sat May 12 12:33:17 2012 +0200 +++ b/TextViewer.py Fri May 18 18:49:49 2012 +0200 @@ -247,7 +247,7 @@ return {"cursor_pos": self.Editor.GetCurrentPos()} def SetState(self, state): - self.Editor.GotoPos(state["cursor_pos"]) + self.Editor.GotoPos(state.get("cursor_pos", 0)) def OnModification(self, event): if not self.DisableEvents: