equal
deleted
inserted
replaced
245 self.Editor.SetStyling(length, style) |
245 self.Editor.SetStyling(length, style) |
246 |
246 |
247 def GetCurrentPos(self): |
247 def GetCurrentPos(self): |
248 return self.Editor.GetCurrentPos() |
248 return self.Editor.GetCurrentPos() |
249 |
249 |
250 def GetState(self): |
|
251 return {"cursor_pos": self.Editor.GetCurrentPos()} |
|
252 |
|
253 def SetState(self, state): |
|
254 if self and state.has_key("cursor_pos"): |
|
255 self.Editor.GotoPos(state.get("cursor_pos", 0)) |
|
256 |
|
257 def OnModification(self, event): |
250 def OnModification(self, event): |
258 if not self.DisableEvents: |
251 if not self.DisableEvents: |
259 mod_type = event.GetModificationType() |
252 mod_type = event.GetModificationType() |
260 if mod_type&wx.stc.STC_MOD_BEFOREINSERT: |
253 if mod_type&wx.stc.STC_MOD_BEFOREINSERT: |
261 if self.CurrentAction == None: |
254 if self.CurrentAction == None: |