Called by the default on-set-focus and on-kill-focus.
Enables or disables the caret in the view's buffer, if there is one.