emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/lisp simple.el


From: Chong Yidong
Subject: [Emacs-diffs] emacs/lisp simple.el
Date: Sat, 07 Feb 2009 05:51:28 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      09/02/07 05:51:28

Modified files:
        lisp           : simple.el 

Log message:
        (line-move-visual): Handle overflow-newline-into-fringe.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/simple.el?cvsroot=emacs&r1=1.969&r2=1.970

Patches:
Index: simple.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/simple.el,v
retrieving revision 1.969
retrieving revision 1.970
diff -u -b -r1.969 -r1.970
--- simple.el   6 Feb 2009 03:59:18 -0000       1.969
+++ simple.el   7 Feb 2009 05:51:27 -0000       1.970
@@ -4035,9 +4035,12 @@
               (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)




reply via email to

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