aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Compostella2012-01-21 11:02:34 +0100
committerMartin Rudalics2012-01-21 11:02:34 +0100
commitf096042862cdc2d204dfa1017e01a222ea50ce80 (patch)
tree88e1e0ab2c8bbf612bcdec073601afc6af879855
parent61086eb66b6a222124f302c197e14021711d29d3 (diff)
downloademacs-f096042862cdc2d204dfa1017e01a222ea50ce80.tar.gz
emacs-f096042862cdc2d204dfa1017e01a222ea50ce80.zip
Fix windmove-reference-loc miscalculation.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/windmove.el18
2 files changed, 14 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 40e4a8a844a..4790ec98cf6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12012-01-21 Jérémy Compostella <jeremy.compostella@gmail.com>
2
3 * windmove.el (windmove-reference-loc): Fix
4 windmove-reference-loc miscalculation.
5
12012-01-21 Jay Belanger <jay.p.belanger@gmail.com> 62012-01-21 Jay Belanger <jay.p.belanger@gmail.com>
2 7
3 * calc/calc-units.el (math-put-default-units): Don't use "1" as a 8 * calc/calc-units.el (math-put-default-units): Don't use "1" as a
diff --git a/lisp/windmove.el b/lisp/windmove.el
index 10a564419fb..0523530869b 100644
--- a/lisp/windmove.el
+++ b/lisp/windmove.el
@@ -417,17 +417,17 @@ supplied, if ARG is greater or smaller than zero, respectively."
417 (- (nth 3 edges) 1)))) 417 (- (nth 3 edges) 1))))
418 (cond 418 (cond
419 ((> effective-arg 0) 419 ((> effective-arg 0)
420 top-left) 420 top-left)
421 ((< effective-arg 0) 421 ((< effective-arg 0)
422 bottom-right) 422 bottom-right)
423 ((= effective-arg 0) 423 ((= effective-arg 0)
424 (windmove-coord-add 424 (windmove-coord-add
425 top-left 425 top-left
426 (let ((col-row 426 ;; Don't care whether window is horizontally scrolled -
427 (posn-col-row 427 ;; `posn-at-point' handles that already. See also:
428 (posn-at-point (window-point window) window)))) 428 ;; http://lists.gnu.org/archive/html/emacs-devel/2012-01/msg00638.html
429 (cons (- (car col-row) (window-hscroll window)) 429 (posn-col-row
430 (cdr col-row))))))))) 430 (posn-at-point (window-point window) window))))))))
431 431
432;; This uses the reference location in the current window (calculated 432;; This uses the reference location in the current window (calculated
433;; by `windmove-reference-loc' above) to find a reference location 433;; by `windmove-reference-loc' above) to find a reference location