Commit 87830974 authored by Paul Eggert's avatar Paul Eggert

* 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.
parent 76031fad
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'.
......
......@@ -2259,7 +2259,7 @@ struct it
/* -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. */
......
......@@ -5179,7 +5179,8 @@ back_to_previous_line_start (struct it *it)
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
......@@ -5271,7 +5272,7 @@ back_to_previous_visible_line_start (struct it *it)
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. */
......@@ -5365,7 +5366,7 @@ reseat_at_next_visible_line_start (struct it *it, int on_newline_p)
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');
......@@ -6813,7 +6814,7 @@ next_element_from_buffer (struct it *it)
&& 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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment