changeset 111615:ab9aebf1b099

subr.el (posn-col-row): Pay attention to header line. (Bug#7390)
author Eli Zaretskii <eliz@gnu.org>
date Sat, 13 Nov 2010 23:07:58 +0200
parents 31f67bce5645
children 7b6e15a1faad
files lisp/ChangeLog lisp/subr.el
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sat Nov 13 16:01:10 2010 -0500
+++ b/lisp/ChangeLog	Sat Nov 13 23:07:58 2010 +0200
@@ -1,3 +1,7 @@
+2010-11-13  Eli Zaretskii  <eliz@gnu.org>
+
+	* subr.el (posn-col-row): Pay attention to header line.  (Bug#7390)
+
 2010-11-13  Chong Yidong  <cyd@stupidchicken.com>
 
 	* textmodes/picture.el (picture-mouse-set-point): Don't use
--- a/lisp/subr.el	Sat Nov 13 16:01:10 2010 -0500
+++ b/lisp/subr.el	Sat Nov 13 23:07:58 2010 +0200
@@ -955,7 +955,8 @@
 	      ((null spacing)
 	       (setq spacing 0)))
 	(cons (/ (car pair) (frame-char-width frame))
-	      (/ (cdr pair) (+ (frame-char-height frame) spacing))))))))
+	      (- (/ (cdr pair) (+ (frame-char-height frame) spacing))
+		 (if (null header-line-format) 0 1))))))))
 
 (defun posn-actual-col-row (position)
   "Return the actual column and row in POSITION, measured in characters.