Helper functions for dealing with selection in the editor.