Mark text changes for processing and restart colorizing, if active.
(self, index1, index2=None)
| 197 | self.notify_range(index1) |
| 198 | |
| 199 | def notify_range(self, index1, index2=None): |
| 200 | "Mark text changes for processing and restart colorizing, if active." |
| 201 | self.tag_add("TODO", index1, index2) |
| 202 | if self.after_id: |
| 203 | if DEBUG: print("colorizing already scheduled") |
| 204 | return |
| 205 | if self.colorizing: |
| 206 | self.stop_colorizing = True |
| 207 | if DEBUG: print("stop colorizing") |
| 208 | if self.allow_colorizing: |
| 209 | if DEBUG: print("schedule colorizing") |
| 210 | self.after_id = self.after(1, self.recolorize) |
| 211 | return |
| 212 | |
| 213 | def close(self): |
| 214 | if self.after_id: |