Mercurial > emacs
comparison lisp/simple.el @ 101849:0750b250db3d
(line-move-visual): Handle overflow-newline-into-fringe.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sat, 07 Feb 2009 05:51:27 +0000 |
parents | fde299e29d94 |
children | d08c7c69fefe |
comparison
equal
deleted
inserted
replaced
101848:0ab814511c60 | 101849:0750b250db3d |
---|---|
4033 (defun line-move-visual (arg &optional noerror) | 4033 (defun line-move-visual (arg &optional noerror) |
4034 (unless (and (floatp temporary-goal-column) | 4034 (unless (and (floatp temporary-goal-column) |
4035 (or (memq last-command '(next-line previous-line)) | 4035 (or (memq last-command '(next-line previous-line)) |
4036 ;; In case we're called from some other command. | 4036 ;; In case we're called from some other command. |
4037 (eq last-command this-command))) | 4037 (eq last-command this-command))) |
4038 (let ((x (car (nth 2 (posn-at-point))))) | 4038 (let ((posn (posn-at-point)) |
4039 (when x | 4039 x) |
4040 (setq temporary-goal-column (/ (float x) (frame-char-width)))))) | 4040 (cond ((eq (nth 1 posn) 'right-fringe) ; overflow-newline-into-fringe |
4041 (setq temporary-goal-column (- (window-width) 1))) | |
4042 ((setq x (car (nth 2 posn))) | |
4043 (setq temporary-goal-column (/ (float x) (frame-char-width))))))) | |
4041 (or (= (vertical-motion | 4044 (or (= (vertical-motion |
4042 (cons (or goal-column (truncate temporary-goal-column)) arg)) | 4045 (cons (or goal-column (truncate temporary-goal-column)) arg)) |
4043 arg) | 4046 arg) |
4044 (unless noerror | 4047 (unless noerror |
4045 (signal (if (< arg 0) | 4048 (signal (if (< arg 0) |