help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to end text-insert undo segment after cursor jump (caused by mouse)?


From: David
Subject: How to end text-insert undo segment after cursor jump (caused by mouse)?
Date: Sat, 17 Oct 2020 19:35:19 +0200

Hello

How to end text-insert undo segment after cursor jump (caused by mouse)?

Coming from vim into (evil-mode) spacemacs, I sometimes get frustrated that undo segment is not ended when a mouse-caused cursor movement occurs. An example : While I am inserting text, touchpad gets often touched, causing the cursor to jump elsewhere. If I have entered five sentences just where I wanted them, without any jump, but sixth sentence gets by mistake entered all over the place because of multiple (three) touchpad touches in different places, when I notice this, I need to be able to execute (three times) "undo" so that the fives sentences stay intact, and the undo operation erase only the sixth sentence from all over the place.

Right now when insert gets this way screwed up, the undo tree contains only one segment. When I press undo, all six sentences disappear. I have to choose all-or-nothing, neither of which is very useful!!

Appending after "blabla" by entering insert mode and typing "This is first sentence. " /now mouse click occurs by mistake/ "This is second sentence." I get: blabla This is This is second sentence. first sentence. Pressing U for undo I need to get : blabla This is first sentence. , but I am instead getting: blabla

Interestingly enough, when text is being replaced and not inserted, everything works as expected - undo segment ends when mouse moves the cursor, so replacing by mistake I can in sequence undo the previous changes made after mouse-caused jump.

How can I fix this? Is it a bug, or some funny feature?


Yours sincerely

   David

PS: Please do not advise me to get "disable touch pad while typing" working.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]