Update script view to use editor.getSelection()