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

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

bug#5717: 23.1; auto-revert-mode loses point in dired buffers


From: flat0103
Subject: bug#5717: 23.1; auto-revert-mode loses point in dired buffers
Date: Sat, 13 Mar 2010 23:34:49 -0800

In dired buffers, auto-revert-mode will cause the location of point to change 
to point-min whenever a change occurs.  It seems much better to keep current 
point; this may not always be the same cursor location, but will be correct 
much more often.

Patch follows:

diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index 81d9fbf..697507f 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -478,6 +478,8 @@ This is an internal function used by Auto-Revert Mode."
          (when eob (goto-char (point-max)))
          (dolist (window eoblist)
            (set-window-point window (point-max)))))
+      (unless eoblist
+        (goto-char (point)))
       ;; `preserve-modes' avoids changing the (minor) modes.  But we
       ;; do want to reset the mode for VC, so we do it manually.
       (when (or revert auto-revert-check-vc-info)








reply via email to

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