changeset 63750:ca6b783d349c

(line-move-1): Fix previous change.
author Richard M. Stallman <rms@gnu.org>
date Fri, 24 Jun 2005 21:11:58 +0000
parents 04f6d5752339
children 569512ab4a08
files lisp/simple.el
diffstat 1 files changed, 5 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Fri Jun 24 20:27:39 2005 +0000
+++ b/lisp/simple.el	Fri Jun 24 21:11:58 2005 +0000
@@ -3442,18 +3442,14 @@
 		  (when (and (not done)
 			     (not (integerp selective-display))
 			     (not (line-move-invisible-p (point))))
-		    ;; We avoid vertical-motion when possible
-		    ;; because that has to fontify.
-		    (forward-line 1)
-		    ;; If there are overlays in and around
-		    ;; the text we moved over, we need to be
-		    ;; sophisticated.
 		    (unless (overlays-in (max (1- pos-before) (point-min))
 					 (min (1+ (point)) (point-max)))
+		      ;; We avoid vertical-motion when possible
+		      ;; because that has to fontify.
+		      (forward-line 1)
 		      (setq line-done t)))
-		  ;; Otherwise move a more sophisticated way.
-		  ;; (What's the logic behind this code?)
 		  (and (not done) (not line-done)
+		       ;; Otherwise move a more sophisticated way.
 		       (zerop (vertical-motion 1))
 		       (if (not noerror)
 			   (signal 'end-of-buffer nil)
@@ -3473,9 +3469,9 @@
 		  (when (and (not done)
 			     (not (integerp selective-display))
 			     (not (line-move-invisible-p (1- (point)))))
-		    (forward-line -1)
 		    (unless (overlays-in (max (1- (point)) (point-min))
 					 (min (1+ pos-before) (point-max)))
+		      (forward-line -1)
 		      (setq line-done t)))
 		  (and (not done) (not line-done)
 		       (zerop (vertical-motion -1))