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: Andrii Kolomoiets
Subject: Re: master f450798: Don't move point in vc-dir on vc-register/vc-checkin (bug#43188)
Date: Sun, 13 Sep 2020 21:58:20 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> -    (save-excursion
>> +    (let ((p (point)))
>>        (dolist (node nodes)
>> -        (ewoc--refresh-node pp node dll)))))
>> +        (ewoc--refresh-node pp node dll))
>> +      (goto-char p))))
>
> Hmm... I think this is an improvement when point is within the refreshed
> node, but a regression when it's further down in the buffer.

You are right.

Take a look at the new patch.  ewoc-invalidate now save and restore
point line and column offset in the current node.

testewoc.el is the code I used to test the patch:

1. emacs -Q
2. M-x load-file testewoc.el
3. M-x testewoc
4. move point somewhere and M-x testewoc-invalidate
Point must remain in the same line and column within the node.  The
nodes is represented with characters "0", "1" and "2".

Attachment: testewoc.el
Description: application/emacs-lisp

Attachment: 0001-Save-and-restore-point-in-ewoc-invalidate.patch
Description: Text Data


reply via email to

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