TextViewer.py
changeset 684 f10449b18dbe
parent 675 0ea836add01f
child 687 629680fb0582
equal deleted inserted replaced
683:37882f34f9cb 684:f10449b18dbe
   245     
   245     
   246     def GetState(self):
   246     def GetState(self):
   247         return {"cursor_pos": self.Editor.GetCurrentPos()}
   247         return {"cursor_pos": self.Editor.GetCurrentPos()}
   248     
   248     
   249     def SetState(self, state):
   249     def SetState(self, state):
   250         self.Editor.GotoPos(state["cursor_pos"])
   250         self.Editor.GotoPos(state.get("cursor_pos", 0))
   251         
   251         
   252     def OnModification(self, event):
   252     def OnModification(self, event):
   253         if not self.DisableEvents:
   253         if not self.DisableEvents:
   254             mod_type = event.GetModificationType()
   254             mod_type = event.GetModificationType()
   255             if mod_type&wx.stc.STC_MOD_BEFOREINSERT:
   255             if mod_type&wx.stc.STC_MOD_BEFOREINSERT: