3 examples of 'python jump to line' in Python

Every line of 'python jump to line' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
59def _jump(self, item: int) -> None:
60 """Jump to a line in the view buffer
61 """
62
63 if item == -1:
64 return
65
66 lineno = int(self.options[item][1].split(':')[1].strip())
67 pt = self.window.active_view().text_point(lineno, 0)
68 self.window.active_view().sel().clear()
69 self.window.active_view().sel().add(sublime.Region(pt))
70
71 self.window.active_view().show(pt)
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

23def goToLine(self, line):
24 self.view.run_command("goto_line", {"line": line})
156def OnSelectLine(self, n):
157 idx = n[0] # due to CH_MULTI
158 idc.Jump(get_name_ea_simple(self.items[idx][2]))

Related snippets