summaryrefslogtreecommitdiff
path: root/lisp/windmove.el
diff options
context:
space:
mode:
authorJérémy Compostella <jeremy.compostella@gmail.com>2012-01-21 11:02:34 +0100
committerMartin Rudalics <rudalics@gmx.at>2012-01-21 11:02:34 +0100
commitf096042862cdc2d204dfa1017e01a222ea50ce80 (patch)
tree88e1e0ab2c8bbf612bcdec073601afc6af879855 /lisp/windmove.el
parent61086eb66b6a222124f302c197e14021711d29d3 (diff)
downloademacs-f096042862cdc2d204dfa1017e01a222ea50ce80.tar.gz
emacs-f096042862cdc2d204dfa1017e01a222ea50ce80.tar.bz2
emacs-f096042862cdc2d204dfa1017e01a222ea50ce80.zip
Fix windmove-reference-loc miscalculation.
Diffstat (limited to 'lisp/windmove.el')
-rw-r--r--lisp/windmove.el18
1 files changed, 9 insertions, 9 deletions
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."
(- (nth 3 edges) 1))))
(cond
((> effective-arg 0)
- top-left)
+ top-left)
((< effective-arg 0)
- bottom-right)
+ bottom-right)
((= effective-arg 0)
- (windmove-coord-add
- top-left
- (let ((col-row
- (posn-col-row
- (posn-at-point (window-point window) window))))
- (cons (- (car col-row) (window-hscroll window))
- (cdr col-row)))))))))
+ (windmove-coord-add
+ top-left
+ ;; Don't care whether window is horizontally scrolled -
+ ;; `posn-at-point' handles that already. See also:
+ ;; http://lists.gnu.org/archive/html/emacs-devel/2012-01/msg00638.html
+ (posn-col-row
+ (posn-at-point (window-point window) window))))))))
;; This uses the reference location in the current window (calculated
;; by `windmove-reference-loc' above) to find a reference location