Make sure the text editor is focused after a rollback

Note: This pull request conflicts with #52, but they can be merged in either order. After the first of these two is merged, I'll update the other pull request to correct the merge conflict.