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

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

Re: How to end text-insert undo segment after cursor jump (caused by mou


From: Stefan Monnier
Subject: Re: How to end text-insert undo segment after cursor jump (caused by mouse)?
Date: Sat, 17 Oct 2020 18:34:02 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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

Note that the behavior you describe comes from code in Evil.  The way
undo steps are divided in non-Evil Emacs is different (mostly, finer
grained).

More specifically, I believe that if you perform the `undo` *before* you
finish your insertion (i.e. before hitting ESC), you should get (more or
less) the behavior you want, i.e. the cursor jump due to your mouse
event will indeed have ended an undo sequence.  Evil then collapses
those undo steps into a single one when you leave insertion mode.

In any case, maybe setting `evil-want-fine-undo` will also do the trick.


        Stefan




reply via email to

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