Regression bug fix: caret position

## Steps to reproduce bug
Select some text and note it out. The caret is placed at the end of the note. If you type the note will expand.

## After the fix
Select some text and note it out. The caret should be placed _after_ the note. If you type then you'll be typing after the note.


If you just need to update the cache and not ensure note integrity you can just call the function updateNoteCache (I think it's called). This will avoid actually doing any operations and will instead just trigger the tree traversal.