emacs-devel
[Top][All Lists]
Advanced

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

Re: master f450798: Don't move point in vc-dir on vc-register/vc-checkin


From: Stefan Monnier
Subject: Re: master f450798: Don't move point in vc-dir on vc-register/vc-checkin (bug#43188)
Date: Tue, 15 Sep 2020 16:32:39 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> Your code works great except:
>
>> +      (goto-char (+ m (* percent (- end m)))))))
>                          ^ this must be wrapped with (round)
>
> Also I would move point by offset rather than percent to save exactly
> the same position.

Feel free to do that, yes (of course taking care of the case where the
new text is shorter than the original position).
I only used `percent` as an example.


        Stefan




reply via email to

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