changeset 62093:ea21bf283231

(line-move-1): Fix 2005-04-26 change. Must still use vertical-motion when selective-display is active.
author Kim F. Storm <storm@cua.dk>
date Thu, 05 May 2005 22:43:06 +0000
parents d79218691a51
children ba1ec4834766
files lisp/simple.el
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Thu May 05 22:42:38 2005 +0000
+++ b/lisp/simple.el	Thu May 05 22:43:06 2005 +0000
@@ -3416,13 +3416,14 @@
 		;; Now move a line.
 		(end-of-line)
 		;; If there's no invisibility here, move over the newline.
-		(if (not (line-move-invisible-p (point)))
+		(if (and (not (integerp selective-display))
+			 (not (line-move-invisible-p (point))))
 		    ;; We avoid vertical-motion when possible
 		    ;; because that has to fontify.
 		    (if (eobp)
-		       (if (not noerror)
-			   (signal 'end-of-buffer nil)
-			 (setq done t))
+			(if (not noerror)
+			    (signal 'end-of-buffer nil)
+			  (setq done t))
 		      (forward-line 1))
 		  ;; Otherwise move a more sophisticated way.
 		  ;; (What's the logic behind this code?)
@@ -3432,11 +3433,13 @@
 			 (setq done t))))
 		(unless done
 		  (setq arg (1- arg))))
-	      ;; The logic of this is the same as the loop above, 
+	      ;; The logic of this is the same as the loop above,
 	      ;; it just goes in the other direction.
 	      (while (and (< arg 0) (not done))
 		(beginning-of-line)
-		(if (or (bobp) (not (line-move-invisible-p (1- (point)))))
+		(if (or (bobp)
+			(and (not (integerp selective-display))
+			     (not (line-move-invisible-p (1- (point))))))
 		    (if (bobp)
 			(if (not noerror)
 			    (signal 'beginning-of-buffer nil)