emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master b08b2e9: Preserve current column, going up/down in


From: Mathias Dahl
Subject: [Emacs-diffs] master b08b2e9: Preserve current column, going up/down in thumbnail view.
Date: Mon, 29 Feb 2016 21:56:52 +0000

branch: master
commit b08b2e9e1232de51c0aa8788d3449d3a111c705b
Author: Mathias Dahl <address@hidden>
Commit: Mathias Dahl <address@hidden>

    Preserve current column, going up/down in thumbnail view.
---
 lisp/image-dired.el |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/image-dired.el b/lisp/image-dired.el
index a8274f5..67b023d 100644
--- a/lisp/image-dired.el
+++ b/lisp/image-dired.el
@@ -1143,7 +1143,8 @@ image."
 (defun image-dired-next-line ()
   "Move to next line and display properties."
   (interactive)
-  (forward-line 1)
+  (let ((goal-column (current-column)))
+    (next-line))
   ;; If we end up in an empty spot, back up to the next thumbnail.
   (if (not (image-dired-image-at-point-p))
       (image-dired-backward-image))
@@ -1155,7 +1156,8 @@ image."
 (defun image-dired-previous-line ()
   "Move to previous line and display properties."
   (interactive)
-  (forward-line -1)
+  (let ((goal-column (current-column)))
+    (previous-line))
   ;; If we end up in an empty spot, back up to the next
   ;; thumbnail. This should only happen if the user deleted a
   ;; thumbnail and did not refresh, so it is not very common. But we



reply via email to

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