all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: How to end text-insert undo segment after cursor jump (caused by mouse)?
Date: Sat, 17 Oct 2020 18:34:02 -0400	[thread overview]
Message-ID: <jwv5z78o5p9.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: 50838aef28bcf8ef6cabeb9c899b4050@mail.vmaly.com

> 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	other threads:[~2020-10-17 22:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-17 17:35 How to end text-insert undo segment after cursor jump (caused by mouse)? David
2020-10-17 22:34 ` Stefan Monnier [this message]
2020-10-19 21:00   ` How to end text-insert undo segment after cursor jump (caused by mouse)? [SOLVED] David
  -- strict thread matches above, loose matches on Subject: below --
2020-10-17 18:44 How to end text-insert undo segment after cursor jump (caused by mouse)? David
2020-10-17 18:50 ` Gregory Heytings via Users list for the GNU Emacs text editor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv5z78o5p9.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.