Is it possible to position a cursor at a specific line?
I've checked out docs but I don't seem to understand how to do this.
quarnster wrote:Menu item: Goto->Line.
Key binding: ctrl+g
def run(self, edit, line):
# Convert from 1 based to a 0 based line number
line = int(line) - 1
# Negative line numbers count from the end of the buffer
if line < 0:
lines, _ = self.view.rowcol(self.view.size())
line = lines + line + 1
pt = self.view.text_point(line, 0)
Users browsing this forum: No registered users and 2 guests