check for non-null controller before updating target elements
removed useless lines from focus update code
select region from cursor on shift-click if it exists and there is no other shift anchor
fix #49