Emacs 24.3 previous-line on empty line moves pointer up two lines #31
Comments
|
Thanks for the report. This is a known issue, caused by a bug that was introduced into Emacs's redisplay engine shortly before the release of 24.3. The bug has been fixed in Emacs trunk, so fci-mode will work correctly with head-of-line Emacs, as well as with 24.2 and earlier versions; it's only the current release that's affected. Unfortunately, since the bug is in C code, not Lisp, it isn't possible to monkey patch it: a fix requires that you rebuild Emacs itself. I'll update the package header with a mention of this issue. But the only fix I can offer is to upgrade to Emacs rev. 112274 or later or to apply the below patch to 24.3 and rebuild. Sorry. |
The reason is that there is a bug in Emacs 24.3 that makes the cursor jumps two lines instead of one and this is quite annoying. See: alpaker/fill-column-indicator#31
|
Here's a workaround: |
|
Good stuff remvee. Only complaint is that your fix caused some problems when standing on line 1. Small modification: (make-variable-buffer-local 'line-move-visual)
(defadvice previous-line (around avoid-jumpy-fci activate)
(if (and (symbol-value 'fci-mode) (> (count-lines 1 (point)) 0))
(progn (fci-mode -1) ad-do-it (fci-mode 1))
ad-do-it)) |
|
For anyone who needs this fix still (e.g., if you are on Ubuntu 14.04), "prog" should be "progn", so: (make-variable-buffer-local 'line-move-visual)
(defadvice previous-line (around avoid-jumpy-fci activate)
(if (and (symbol-value 'fci-mode) (> (count-lines 1 (point)) 0))
(progn (fci-mode -1) ad-do-it (fci-mode 1))
ad-do-it)) |
|
Shouldn't this issue be removed from the README? |
With version 1.84 in Emacs 24.3 on Mac OS X 10.8.3 previous-line (via or C-p) on an empty line moves the pointer up twice (to the previous, previous line).
The text was updated successfully, but these errors were encountered: