Apparently I am too stupid ...
-
… to find the editor command that will scroll the document to make the caret visible. I tried editor.goToPos( ), which I found in the PythonScript documentation, but it produces only “AttributeError: ‘Editor’ object has no attribute ‘goToPos’” in the console. Everything else I’ve found will put the caret where it is supposed to but won’t scroll the document to make it visible. Can any smart person out there clue me in?
Thanks,
Matt -
Hello Matt,
python is case sensitive
>>> help(editor.gotoPos) Help on method gotoPos: gotoPos(...) method of Npp.Editor instance gotoPos( (Editor)arg1, (int)pos) -> None : Set caret to a position and ensure it is visible.Regarding scrolling, here is the documentation.
Cheers
Claudia -
Ah! So not only too stupid, but also too blind to notice a singular deviation from otherwise very uniform use of camel case for function names. Unless “goto” is now a single English word in its own right and not just a programming command. Grumble grumble.
Thanks again Claudia for getting me unstuck !!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login