From: Chong Yidong Date: Sat, 7 Feb 2009 05:51:27 +0000 (+0000) Subject: (line-move-visual): Handle overflow-newline-into-fringe. X-Git-Tag: emacs-pretest-23.0.91~367 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b6d79b2f069eac96fe9f45ef084975a4d6d3bea8;p=emacs.git (line-move-visual): Handle overflow-newline-into-fringe. --- diff --git a/lisp/simple.el b/lisp/simple.el index 8410d625fc3..950d7f0730d 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -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)