Skip to content

Commit 10a4389

Browse files
authored
Create GotoLineCol_Barebones.py
This file has only four lines of code. Intended to give a quick understanding of the core functionality in the main GotoLineCol.py script,
1 parent 77f24ab commit 10a4389

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
curLine = editor.lineFromPosition(editor.getCurrentPos())
2+
3+
line = int( notepad.prompt('Line Number:', 'Navigate to a line and character position', str(curLine + 1) ))
4+
pos = int( notepad.prompt('Character Position:', 'Navigate to a line and character position', str( editor.getCurrentPos() - editor.positionFromLine(curLine) + 1 ) ))
5+
6+
editor.gotoPos(editor.positionFromLine(line - 1) + pos - 1)

0 commit comments

Comments
 (0)