MCPcopy Index your code
hub / github.com/python/cpython / get_selection_indices

Method get_selection_indices

Lib/idlelib/editor.py:1261–1267  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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).

Callers 5

smart_backspace_eventMethod · 0.95
smart_indent_eventMethod · 0.95
get_regionMethod · 0.45

Calls 1

indexMethod · 0.45

Tested by

no test coverage detected