]> git.eshelyaron.com Git - emacs.git/commitdiff
(line-move-visual): Handle overflow-newline-into-fringe.
authorChong Yidong <cyd@stupidchicken.com>
Sat, 7 Feb 2009 05:51:27 +0000 (05:51 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Sat, 7 Feb 2009 05:51:27 +0000 (05:51 +0000)
lisp/simple.el

index 8410d625fc3e380c61139bcbc79049716ba39f48..950d7f0730d1a61da8410021e004e44cf685a438 100644 (file)
@@ -4035,9 +4035,12 @@ into account variable-width characters and line continuation."
               (or (memq last-command '(next-line previous-line))
                   ;; In case we're called from some other command.
                   (eq last-command this-command)))
-    (let ((x (car (nth 2 (posn-at-point)))))
-      (when x
-       (setq temporary-goal-column (/ (float x) (frame-char-width))))))
+    (let ((posn (posn-at-point))
+         x)
+      (cond ((eq (nth 1 posn) 'right-fringe) ; overflow-newline-into-fringe
+            (setq temporary-goal-column (- (window-width) 1)))
+           ((setq x (car (nth 2 posn)))
+            (setq temporary-goal-column (/ (float x) (frame-char-width)))))))
   (or (= (vertical-motion
          (cons (or goal-column (truncate temporary-goal-column)) arg))
         arg)