I work on a laptop most of the time and it happens somewhat often that while inserting some text (in evil mode) I will accidentally hit the touchpad with my thumb, changing the cursor position and causing the next few words to be inserted into some unrelated paragraph. The somewhat annoying thing is that undo is usually of no help here, because the last saved undo state is whenever I entered insert mode and I might have written several sentences since then that I don't want to lose. I'd rather not completely disable use of the mouse, so I'm hoping to implement one of the following acceptable fixes:
- Don't allow mouse clicks to change position while in evil insert mode, only in normal mode (this sounds the simplest).
- Update the undo state whenever I change cursor position with the mouse, if there is a callback for that.
Are either of these possible?