TextViewer.py
changeset 704 aca0c83ed82e
parent 699 649399ffdaf0
child 716 2681a6da58d6
--- 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):