changeset 528:5af35411366a

*** empty log message ***
author Jim Blandy <jimb@redhat.com>
date Mon, 03 Feb 1992 21:41:25 +0000
parents 703fd28f892d
children 413127b220ef
files src/xdisp.c
diffstat 1 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Mon Feb 03 03:20:43 1992 +0000
+++ b/src/xdisp.c	Mon Feb 03 21:41:25 1992 +0000
@@ -407,6 +407,13 @@
       && (XFASTINT (w->last_modified) >= MODIFF
 	  || (beg_unchanged >= tlbufpos - 1
 	      && GPT >= tlbufpos
+	      /* If selective display, can't optimize
+		 if the changes start at the beginning of the line.  */
+	      && ((XTYPE (current_buffer->selective_display) == Lisp_Int
+		   && XINT (current_buffer->selective_display) > 0
+		   ? (beg_unchanged >= tlbufpos
+		      && GPT > tlbufpos)
+		   : 1))
 	      && end_unchanged >= tlendpos
 	      && Z - GPT >= tlendpos)))
     {
@@ -1081,7 +1088,12 @@
   /* If about to start displaying at the beginning of a continuation line,
      really start with previous screen line, in case it was not
      continued when last redisplayed */
-  if (bp.contin && bp.bufpos - 1 == beg_unchanged && vpos > 0)
+  if ((bp.contin && bp.bufpos - 1 == beg_unchanged && vpos > 0)
+      ||
+      /* Likewise if we have to worry about selective display.  */
+      (XTYPE (current_buffer->selective_display) == Lisp_Int
+       && XINT (current_buffer->selective_display) > 0
+       && bp.bufpos - 1 == beg_unchanged && vpos > 0))
     {
       bp = *vmotion (bp.bufpos, -1, width, hscroll, window);
       --vpos;