diff --git a/scripts/Samples/GotoLineCol_Barebones.py b/scripts/Samples/GotoLineCol_Barebones.py new file mode 100644 index 00000000..484551a0 --- /dev/null +++ b/scripts/Samples/GotoLineCol_Barebones.py @@ -0,0 +1,6 @@ +curLine = editor.lineFromPosition(editor.getCurrentPos()) + +line = int( notepad.prompt('Line Number:', 'Navigate to a line and character position', str(curLine + 1) )) +pos = int( notepad.prompt('Character Position:', 'Navigate to a line and character position', str( editor.getCurrentPos() - editor.positionFromLine(curLine) + 1 ) )) + +editor.gotoPos(editor.positionFromLine(line - 1) + pos - 1)