Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Editorial exits on editor.set_selection() with arguments out of range
-
This may well be a known or fixed issue – Editorial crashes/exits on out-of-range set_selection()
To reproduce:
-
create an empty file
-
run a python script workflow action like:
#coding: utf-8
import editoreditor.set_selection(4,4) # out of range - buffer empty
-
-
Thanks, I'll look into this.
-
Funnily enough I use editor.set_selection(1,9999999) to select the whole document - and then do a replace. This is in one of my scripts. You'd think THAT would get an "out of range error" but it doesn't. I WOULD like a "select all" function, of course.
-
The bug only occurs if the start of the range is out of bounds, the length is capped automatically.
-
@omz Thanks. I still feel like I'm exploiting an undocumented loophole. Please consider documenting how to select the whole document.