emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r106902: Fix windmove-reference-loc m


From: martin rudalics
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106902: Fix windmove-reference-loc miscalculation.
Date: Sat, 21 Jan 2012 11:02:34 +0100
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106902
author: Jérémy Compostella  <address@hidden>
committer: martin rudalics <address@hidden>
branch nick: trunk
timestamp: Sat 2012-01-21 11:02:34 +0100
message:
  Fix windmove-reference-loc miscalculation.
modified:
  lisp/ChangeLog
  lisp/windmove.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-01-21 00:46:09 +0000
+++ b/lisp/ChangeLog    2012-01-21 10:02:34 +0000
@@ -1,3 +1,8 @@
+2012-01-21  Jérémy Compostella  <address@hidden>
+
+       * windmove.el (windmove-reference-loc): Fix
+       windmove-reference-loc miscalculation.
+
 2012-01-21  Jay Belanger  <address@hidden>
 
        * calc/calc-units.el (math-put-default-units): Don't use "1" as a

=== modified file 'lisp/windmove.el'
--- a/lisp/windmove.el  2012-01-19 07:21:25 +0000
+++ b/lisp/windmove.el  2012-01-21 10:02:34 +0000
@@ -417,17 +417,17 @@
                               (- (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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]