From: Stefan Monnier Date: Tue, 5 Mar 2002 18:56:16 +0000 (+0000) Subject: (skip_invisible): Fix my brain fart. X-Git-Tag: ttn-vms-21-2-B4~16315 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=662152ddd2188abbfe9fbde53767e98cd23d1387;p=emacs.git (skip_invisible): Fix my brain fart. --- diff --git a/src/indent.c b/src/indent.c index 402456e1685..c084890c069 100644 --- a/src/indent.c +++ b/src/indent.c @@ -221,7 +221,7 @@ skip_invisible (pos, next_boundary_p, to, window) { 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 @@ skip_invisible (pos, next_boundary_p, to, window) } /* 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; }