diff -r 1a14560e10ed -r aca0c83ed82e TextViewer.py --- a/TextViewer.py Mon Jun 04 02:04:29 2012 +0200 +++ b/TextViewer.py Wed Jun 06 16:57:58 2012 +0200 @@ -248,7 +248,7 @@ return {"cursor_pos": self.Editor.GetCurrentPos()} def SetState(self, state): - if self: + if self and state.has_key("cursor_pos"): self.Editor.GotoPos(state.get("cursor_pos", 0)) def OnModification(self, event):