Fix vertical cursor motion with non-default fonts.
authorEli Zaretskii <eliz@gnu.org>
Sat, 6 Jul 2013 17:38:24 +0000 (20:38 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 6 Jul 2013 17:38:24 +0000 (20:38 +0300)
 lisp/simple.el (line-move-partial): Adjust the row returned by
 posn-at-point for the current window-vscroll.  (Bug#14567)

lisp/ChangeLog
lisp/simple.el

index 872f4f5..a4ee883 100644 (file)
@@ -1,3 +1,8 @@
+2013-07-06  Eli Zaretskii  <eliz@gnu.org>
+
+       * simple.el (line-move-partial): Adjust the row returned by
+       posn-at-point for the current window-vscroll.  (Bug#14567)
+
 2013-07-06  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/tramp-sh.el (tramp-sh-file-gvfs-monitor-dir-process-filter):
index c4c7d56..b4b8ddf 100644 (file)
@@ -4759,9 +4759,12 @@ lines."
                  this-height (nth 4 wstart))))
        (setq py
              (or (nth 1 this-lh)
-                 (let ((ppos (posn-at-point)))
-                   (cdr (or (posn-actual-col-row ppos)
-                            (posn-col-row ppos))))))
+                 (let ((ppos (posn-at-point))
+                       col-row)
+                   (setq col-row (posn-actual-col-row ppos))
+                   (if col-row
+                       (- (cdr col-row) (window-vscroll))
+                     (cdr (posn-col-row ppos))))))
        (cond
         ;; If last line of window is fully visible, and vscrolling
         ;; more would make this line invisible, move forward.