2011-06-17 Paul Eggert <eggert@cs.ucla.edu>
+ * dispextern.h (struct it.selective): Now EMACS_INT, not int.
+ * xdisp.c (forward_to_next_line_start)
+ (back_to_previous_visible_line_start)
+ (reseat_at_next_visible_line_start, next_element_from_buffer):
+ Don't arbitrarily truncate the value of 'selective' to int.
+
* xdisp.c (init_iterator): Use XINT, not XFASTINT; it might be < 0.
* composite.c: Don't truncate sizes to 'int'.
/* -1 means selective display hides everything between a \r and the
next newline; > 0 means hide lines indented more than that value. */
- int selective;
+ EMACS_INT selective;
/* An enumeration describing what the next display element is
after a call to get_next_display_element. */
static int
forward_to_next_line_start (struct it *it, int *skipped_p)
{
- int old_selective, newline_found_p, n;
+ EMACS_INT old_selective;
+ int newline_found_p, n;
const int MAX_NEWLINE_DISTANCE = 500;
/* If already on a newline, just consume it to avoid unintended
invisible. */
if (it->selective > 0
&& indented_beyond_p (IT_CHARPOS (*it), IT_BYTEPOS (*it),
- (double) it->selective)) /* iftc */
+ it->selective))
continue;
/* Check the newline before point for invisibility. */
if (it->selective > 0)
while (IT_CHARPOS (*it) < ZV
&& indented_beyond_p (IT_CHARPOS (*it), IT_BYTEPOS (*it),
- (double) it->selective)) /* iftc */
+ it->selective))
{
xassert (IT_BYTEPOS (*it) == BEGV
|| FETCH_BYTE (IT_BYTEPOS (*it) - 1) == '\n');
&& IT_CHARPOS (*it) + 1 < ZV
&& indented_beyond_p (IT_CHARPOS (*it) + 1,
IT_BYTEPOS (*it) + 1,
- (double) it->selective)) /* iftc */
+ it->selective))
{
success_p = next_element_from_ellipsis (it);
it->dpvec_char_len = -1;