summaryrefslogtreecommitdiff
path: root/lisp/subr.el
diff options
context:
space:
mode:
authorJohn Paul Wallington <jpw@pobox.com>2003-03-11 12:49:20 +0000
committerJohn Paul Wallington <jpw@pobox.com>2003-03-11 12:49:20 +0000
commitee24a85250b99a13292675ce030b5d88eb4a619b (patch)
tree1f5a6b2aff05cc6c9e08e64ee822239e72d8b122 /lisp/subr.el
parent963c2e09c084d528cd0432eb7c039c374816df3c (diff)
downloademacs-ee24a85250b99a13292675ce030b5d88eb4a619b.tar.gz
(posn-col-row): Heed frame parameter `line-spacing' and
`default-line-spacing', rather than buffer-local `line-spacing'.
Diffstat (limited to 'lisp/subr.el')
-rw-r--r--lisp/subr.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 29afbecb1e5..11e6869ffcd 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -657,9 +657,8 @@ For a scroll-bar event, the result column is 0, and the row
corresponds to the vertical position of the click in the scroll bar."
(let* ((pair (nth 2 position))
(window (posn-window position))
- (vspacing (or (buffer-local-value 'line-spacing
- (window-buffer window))
- 0)))
+ (vspacing (or (frame-parameter (window-frame window) 'line-spacing)
+ default-line-spacing)))
(if (eq (if (consp (nth 1 position))
(car (nth 1 position))
(nth 1 position))
@@ -672,7 +671,8 @@ corresponds to the vertical position of the click in the scroll bar."
(cons (scroll-bar-scale pair (window-width window)) 0)
(let* ((frame (if (framep window) window (window-frame window)))
(x (/ (car pair) (frame-char-width frame)))
- (y (/ (cdr pair) (+ (frame-char-height frame) vspacing))))
+ (y (/ (cdr pair) (+ (frame-char-height frame)
+ (or vspacing 0)))))
(cons x y))))))
(defsubst posn-timestamp (position)