changeset 34924:db558893a42c

(move_it_by_lines): Don't do optimizations if NEED_Y_P is zero. It's not worth the complexity. (invisible_text_between_p): Put in #if 0 because unused.
author Gerd Moellmann <gerd@gnu.org>
date Fri, 29 Dec 2000 14:24:09 +0000
parents c96c07c36f33
children 6043184119bc
files src/xdisp.c
diffstat 1 files changed, 6 insertions(+), 70 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Fri Dec 29 13:29:13 2000 +0000
+++ b/src/xdisp.c	Fri Dec 29 14:24:09 2000 +0000
@@ -5071,6 +5071,8 @@
 }
 
 
+#if 0 /* Currently not used.  */
+
 /* Return non-zero if some text between buffer positions START_CHARPOS
    and END_CHARPOS is invisible.  IT->window is the window for text
    property lookup.  */
@@ -5101,6 +5103,8 @@
   return invisible_found_p;
 }
 
+#endif /* 0 */
+
 
 /* Move IT by a specified number DVPOS of screen lines down.  DVPOS
    negative means move up.  DVPOS == 0 means move to the start of the
@@ -5136,80 +5140,12 @@
       xassert (it->current_x == 0 && it->hpos == 0);
     }
   else if (dvpos > 0)
-    {
-      /* If there are no continuation lines, and if there is no
-	 selective display, try the simple method of moving forward
-	 DVPOS newlines, then see where we are.  */
-      if (!need_y_p && it->truncate_lines_p && it->selective == 0)
-	{
-	  int shortage = 0, charpos;
-
-	  if (FETCH_BYTE (IT_BYTEPOS (*it)) == '\n')
-	    charpos = IT_CHARPOS (*it) + 1;
-	  else
-	    charpos = scan_buffer ('\n', IT_CHARPOS (*it), 0, dvpos,
-				   &shortage, 0);
-	  
-	  if (!invisible_text_between_p (it, IT_CHARPOS (*it), charpos))
-	    {
-	      struct text_pos pos;
-	      CHARPOS (pos) = charpos;
-	      BYTEPOS (pos) = CHAR_TO_BYTE (charpos);
-	      reseat (it, pos, 1);
-	      it->vpos += dvpos - shortage;
-	      it->hpos = it->current_x = 0;
-	      return;
-	    }
-	}
-
-      move_it_to (it, -1, -1, -1, it->vpos + dvpos, MOVE_TO_VPOS);
-    }
+    move_it_to (it, -1, -1, -1, it->vpos + dvpos, MOVE_TO_VPOS);
   else
     {
       struct it it2;
       int start_charpos, i;
-
-      /* If there are no continuation lines, and if there is no
-	 selective display, try the simple method of moving backward
-	 -DVPOS newlines.  */
-      if (!need_y_p && it->truncate_lines_p && it->selective == 0)
-	{
-	  int shortage;
-	  int charpos = IT_CHARPOS (*it);
-	  int bytepos = IT_BYTEPOS (*it);
-
-	  /* If in the middle of a line, go to its start.  */
-	  if (charpos > BEGV && FETCH_BYTE (bytepos - 1) != '\n')
-	    {
-	      charpos = find_next_newline_no_quit (charpos, -1);
-	      bytepos = CHAR_TO_BYTE (charpos);
-	    }
-
-	  if (charpos == BEGV)
-	    {
-	      struct text_pos pos;
-	      CHARPOS (pos) = charpos;
-	      BYTEPOS (pos) = bytepos;
-	      reseat (it, pos, 1);
-	      it->hpos = it->current_x = 0;
-	      return;
-	    }
-	  else
-	    {
-	      charpos = scan_buffer ('\n', charpos - 1, 0, dvpos, &shortage, 0);
-	      if (!invisible_text_between_p (it, charpos, IT_CHARPOS (*it)))
-		{
-		  struct text_pos pos;
-		  CHARPOS (pos) = charpos;
-		  BYTEPOS (pos) = CHAR_TO_BYTE (charpos);
-		  reseat (it, pos, 1);
-		  it->vpos += dvpos + (shortage ? shortage - 1 : 0);
-		  it->hpos = it->current_x = 0;
-		  return;
-		}
-	    }
-	}
-
+      
       /* Go back -DVPOS visible lines and reseat the iterator there.  */
       start_charpos = IT_CHARPOS (*it);
       for (i = -dvpos; i && IT_CHARPOS (*it) > BEGV; --i)