(self)
| 1259 | # If a selection is defined in the text widget, return (start, |
| 1260 | # end) as Tkinter text indices, otherwise return (None, None) |
| 1261 | def get_selection_indices(self): |
| 1262 | try: |
| 1263 | first = self.text.index("sel.first") |
| 1264 | last = self.text.index("sel.last") |
| 1265 | return first, last |
| 1266 | except TclError: |
| 1267 | return None, None |
| 1268 | |
| 1269 | # Return the text widget's current view of what a tab stop means |
| 1270 | # (equivalent width in spaces). |
no test coverage detected