]> git.eshelyaron.com Git - emacs.git/commit
dired-revert: save line numbers instead of positions
authorTino Calancha <tino.calancha@gmail.com>
Sun, 6 Aug 2017 04:05:16 +0000 (13:05 +0900)
committerTino Calancha <tino.calancha@gmail.com>
Sun, 6 Aug 2017 04:09:31 +0000 (13:09 +0900)
commit7c3593f81724d0c7a2ee2f90797db0e705adc859
tree1c87dc10cc0ca3fd1cd7774bbf181eef782d1f8c
parent9b463fa8648b7baed95a44f4317cb7402fd8bf1c
dired-revert: save line numbers instead of positions

Positions might change if the length of one dired header line
changes; this happen, for instance, if we add new files.
Instead, line numbers are invariant under shrinks/enlargements
of the file header.
https://lists.gnu.org/archive/html/emacs-devel/2017-07/msg01092.html
* lisp/dired.el (dired-save-positions): Save the line numbers at point.
(dired-restore-positions): Use forward-line to restore the original
position (Bug#27968).
* test/lisp/dired-tests.el (dired-test-bug27968): Add test.
lisp/dired.el
test/lisp/dired-tests.el