Fix `editor.selectedContainer`

This tests `editor.hasSelection` but it also uses `editor.setCaretIn` so...