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

Method goto_line_event

Lib/idlelib/editor.py:682–694  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

680 return "break"
681
682 def goto_line_event(self, event):
683 text = self.text
684 lineno = query.Goto(
685 text, "Go To Line",
686 "Enter a positive integer\n"
687 "('big' = end of file):"
688 ).result
689 if lineno is not None:
690 text.tag_remove("sel", "1.0", "end")
691 text.mark_set("insert", f'{lineno}.0')
692 text.see("insert")
693 self.set_line_and_column()
694 return "break"
695
696 def open_module(self):
697 """Get module name from user and open it.

Callers

nothing calls this directly

Calls 4

set_line_and_columnMethod · 0.95
tag_removeMethod · 0.45
mark_setMethod · 0.45
seeMethod · 0.45

Tested by

no test coverage detected