|
From: | Andreas Röhler |
Subject: | Re: Keeping column when up/down |
Date: | Sun, 11 Dec 2016 22:24:03 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Icedove/45.4.0 |
On 11.12.2016 21:30, Eli Zaretskii wrote:
Cc: Eli Zaretskii <eliz@gnu.org> From: Andreas Röhler <andreas.roehler@easy-emacs.de> Date: Sun, 11 Dec 2016 20:46:36 +0100 Keeps column when goal-column is nil. Looks like a bug.No, it's a feature (assuming I understood what you are complaining about; sorry if I didn't).
Thought at something like that: (defun ar-previous-line (arg) "Moving ARG upwards. Keep the column if possible. " (interactive "^p") (unless (bobp) (let ((col (if (eq last-command 'ar-previous-line) ar-vertical-move-start-column (setq ar-vertical-move-start-column (current-column))))) (previous-line arg arg) (when (< col (save-excursion (end-of-line) (current-column))) (move-to-column col)))))
[Prev in Thread] | Current Thread | [Next in Thread] |