summaryrefslogtreecommitdiff
path: root/lisp/simple.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2013-07-06 20:38:24 +0300
committerEli Zaretskii <eliz@gnu.org>2013-07-06 20:38:24 +0300
commit23de972aa74fce7360b263d639ffbd674931e408 (patch)
treee7c1a05e023888fbcf56c103c321527af473948c /lisp/simple.el
parent54a4248627162096c706fc0218891db4cc59f138 (diff)
downloademacs-23de972aa74fce7360b263d639ffbd674931e408.tar.gz
Fix vertical cursor motion with non-default fonts.
lisp/simple.el (line-move-partial): Adjust the row returned by posn-at-point for the current window-vscroll. (Bug#14567)
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index c4c7d56dc2a..b4b8ddfabed 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -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.