changeset 43735:30053d20015f

(skip_invisible): Fix my brain fart.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 05 Mar 2002 18:56:16 +0000
parents ff1f9768901a
children 264efb189de1
files src/indent.c
diffstat 1 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/indent.c	Tue Mar 05 18:54:18 2002 +0000
+++ b/src/indent.c	Tue Mar 05 18:56:16 2002 +0000
@@ -221,7 +221,7 @@
 {
   Lisp_Object prop, position, overlay_limit, proplimit;
   Lisp_Object buffer;
-  int end;
+  int end, inv_p;
 
   XSETFASTINT (position, pos);
   XSETBUFFER (buffer, current_buffer);
@@ -266,11 +266,13 @@
     }
   /* if the `invisible' property is set, we can skip to
      the next property change */
-  if (!NILP (window) && EQ (XWINDOW (window)->buffer, buffer))
-    prop = Fget_char_property (position, Qinvisible, window);
-  else
-    prop = Fget_char_property (position, Qinvisible, buffer);
-  if (TEXT_PROP_MEANS_INVISIBLE (prop) > NILP (window))
+  prop = Fget_char_property (position, Qinvisible,
+			     (!NILP (window)
+			      && EQ (XWINDOW (window)->buffer, buffer))
+			     ? window : buffer);
+  inv_p = TEXT_PROP_MEANS_INVISIBLE (prop);
+  /* When counting columns (window == nil), don't skip over ellipsis text.  */
+  if (NILP (window) ? inv_p == 1 : inv_p)
     return *next_boundary_p;
   return pos;
 }