Pull JoshEdit changes and fix caret focus.