insert at caret position, fix #2