(self, index, chars, tags=None)
| 371 | self.callback = callback |
| 372 | |
| 373 | def insert(self, index, chars, tags=None): |
| 374 | is_single_line = '\n' not in chars |
| 375 | if is_single_line: |
| 376 | before_displaylines = get_displaylines(self, index) |
| 377 | |
| 378 | self.delegate.insert(index, chars, tags) |
| 379 | |
| 380 | if is_single_line: |
| 381 | after_displaylines = get_displaylines(self, index) |
| 382 | if after_displaylines == before_displaylines: |
| 383 | return # no need to update the sidebar |
| 384 | |
| 385 | self.callback() |
| 386 | |
| 387 | def delete(self, index1, index2=None): |
| 388 | if index2 is None: |
nothing calls this directly
no test coverage detected