Update script view to use editor.getSelection()

From #107:

>At the very least, I think I'd like to split this up into two PRs.
>
>One PR to switch over to using `editor.getSelection()` but still passing the code directly (`arg = selection.getText()`). That will get merged quickly as it cleans up the "is there a selection" logic immensely.