Merge pull request #6 from hluk/master

Fix cursor position in insert and visual modes
Use setTextCursor() instead sending events