/* Do this even if LINES is 0, so that we move back to the
beginning of the current line as we ought. */
if (XINT (lines) == 0 || IT_CHARPOS (it) > 0)
- move_it_by_lines (&it, XINT (lines), 0);
+ move_it_by_lines (&it, XINT (lines));
}
else
{
|| (it_overshoot_expected < 0
&& it.method == GET_FROM_BUFFER
&& it.c == '\n'))
- move_it_by_lines (&it, -1, 0);
+ move_it_by_lines (&it, -1);
it.vpos = 0;
- move_it_by_lines (&it, XINT (lines), 0);
+ move_it_by_lines (&it, XINT (lines));
}
else
{
while (IT_CHARPOS (it) <= it_start)
{
it.vpos = 0;
- move_it_by_lines (&it, 1, 0);
+ move_it_by_lines (&it, 1);
}
if (XINT (lines) > 1)
- move_it_by_lines (&it, XINT (lines) - 1, 0);
+ move_it_by_lines (&it, XINT (lines) - 1);
}
else
{
it.vpos = 0;
- move_it_by_lines (&it, XINT (lines), 0);
+ move_it_by_lines (&it, XINT (lines));
}
}
}
looking at an image that is taller that the window height. */
while (start_pos == IT_CHARPOS (it)
&& start_pos > BEGV)
- move_it_by_lines (&it, -1, 1);
+ move_it_by_lines (&it, -1);
}
else if (dy > 0)
{
looking at an image that is taller that the window height. */
while (start_pos == IT_CHARPOS (it)
&& start_pos < ZV)
- move_it_by_lines (&it, 1, 1);
+ move_it_by_lines (&it, 1);
}
}
else
- move_it_by_lines (&it, n, 1);
+ move_it_by_lines (&it, n);
/* We failed if we find ZV is already on the screen (scrolling up,
means there's nothing past the end), or if we can't start any
while (it.current_y < this_scroll_margin)
{
int prev = it.current_y;
- move_it_by_lines (&it, 1, 1);
+ move_it_by_lines (&it, 1);
if (prev == it.current_y)
break;
}
partial_p = it.current_y + it.ascent + it.descent > it.last_visible_y;
else
{
- move_it_by_lines (&it, 1, 1);
+ move_it_by_lines (&it, 1);
partial_p = it.current_y > it.last_visible_y;
}
/* The last line was only partially visible, so back up two
lines to make sure we're on a fully visible line. */
{
- move_it_by_lines (&it, -2, 0);
+ move_it_by_lines (&it, -2);
SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it));
}
else
start_display (&it, w, pt);
/* Be sure we have the exact height of the full line containing PT. */
- move_it_by_lines (&it, 0, 1);
+ move_it_by_lines (&it, 0);
/* The amount of pixels we have to move back is the window
height minus what's displayed in the line containing PT,
and the lines below. */
it.current_y = 0;
it.vpos = 0;
- move_it_by_lines (&it, nlines, 1);
+ move_it_by_lines (&it, nlines);
if (it.vpos == nlines)
h -= it.current_y;
*/
h += extra_line_spacing;
while (-it.current_y > h)
- move_it_by_lines (&it, 1, 1);
+ move_it_by_lines (&it, 1);
charpos = IT_CHARPOS (it);
bytepos = IT_BYTEPOS (it);
static int try_scrolling (Lisp_Object, int, EMACS_INT, EMACS_INT, int, int);
static int try_cursor_movement (Lisp_Object, struct text_pos, int *);
static int trailing_whitespace_p (EMACS_INT);
-static unsigned long int message_log_check_duplicate (EMACS_INT, EMACS_INT,
- EMACS_INT, EMACS_INT);
+static unsigned long int message_log_check_duplicate (EMACS_INT, EMACS_INT);
static void push_it (struct it *);
static void pop_it (struct it *);
static void sync_frame_with_window_matrix_rows (struct window *);
static void select_frame_for_redisplay (Lisp_Object);
-static void redisplay_internal (int);
+static void redisplay_internal ();
static int echo_area_display (int);
static void redisplay_windows (Lisp_Object);
static void redisplay_window (Lisp_Object, int);
line_height = last_height;
else if (IT_CHARPOS (*it) < ZV)
{
- move_it_by_lines (it, 1, 1);
+ move_it_by_lines (it, 1);
line_height = (it->max_ascent || it->max_descent
? it->max_ascent + it->max_descent
: last_height);
it2 = it;
if (IT_CHARPOS (it) < ZV && FETCH_BYTE (IT_BYTEPOS (it)) != '\n')
- move_it_by_lines (&it, 1, 0);
+ move_it_by_lines (&it, 1);
if (charpos < IT_CHARPOS (it)
|| (it.what == IT_EOB && charpos == IT_CHARPOS (it)))
{
/* DY == 0 means move to the start of the screen line. The
value of nlines is > 0 if continuation lines were involved. */
if (nlines > 0)
- move_it_by_lines (it, nlines, 1);
+ move_it_by_lines (it, nlines);
}
else
{
{
do
{
- move_it_by_lines (it, 1, 1);
+ move_it_by_lines (it, 1);
}
while (target_y >= line_bottom_y (it) && IT_CHARPOS (*it) < ZV);
}
if (IT_CHARPOS (*it) == ZV
&& ZV > BEGV
&& FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n')
- move_it_by_lines (it, 0, 0);
+ move_it_by_lines (it, 0);
}
}
/* Move IT by a specified number DVPOS of screen lines down. DVPOS
negative means move up. DVPOS == 0 means move to the start of the
- screen line. NEED_Y_P non-zero means calculate IT->current_y. If
- NEED_Y_P is zero, IT->current_y will be left unchanged.
+ screen line.
- Further optimization ideas: If we would know that IT->f doesn't use
+ Optimization idea: If we would know that IT->f doesn't use
a face with proportional font, we could be faster for
truncate-lines nil. */
void
-move_it_by_lines (struct it *it, int dvpos, int need_y_p)
+move_it_by_lines (struct it *it, int dvpos)
{
/* The commented-out optimization uses vmotion on terminals. This
prev_bol = PT;
prev_bol_byte = PT_BYTE;
- dups = message_log_check_duplicate (prev_bol, prev_bol_byte,
- this_bol, this_bol_byte);
+ dups = message_log_check_duplicate (prev_bol_byte,
+ this_bol_byte);
if (dups)
{
del_range_both (prev_bol, prev_bol_byte,
value N > 1 if we should also append " [N times]". */
static unsigned long int
-message_log_check_duplicate (EMACS_INT prev_bol, EMACS_INT prev_bol_byte,
- EMACS_INT this_bol, EMACS_INT this_bol_byte)
+message_log_check_duplicate (EMACS_INT prev_bol_byte, EMACS_INT this_bol_byte)
{
EMACS_INT i;
EMACS_INT len = Z_BYTE - 1 - this_bol_byte;
{
++windows_or_buffers_changed;
++update_mode_lines;
- redisplay_internal (0);
+ redisplay_internal ();
}
}
}
int count = SPECPDL_INDEX ();
specbind (Qredisplay_dont_pause, Qt);
windows_or_buffers_changed = 1;
- redisplay_internal (0);
+ redisplay_internal ();
unbind_to (count, Qnil);
}
else if (FRAME_WINDOW_P (f) && n == 0)
void
redisplay (void)
{
- redisplay_internal (0);
+ redisplay_internal ();
}
polling_stopped_here = 0; } while (0)
-/* If PRESERVE_ECHO_AREA is nonzero, it means this redisplay is not in
- response to any user action; therefore, we should preserve the echo
- area. (Actually, our caller does that job.) Perhaps in the future
- avoid recentering windows if it is not necessary; currently that
- causes some problems. */
+/* Perhaps in the future avoid recentering windows if it
+ is not necessary; currently that causes some problems. */
static void
-redisplay_internal (int preserve_echo_area)
+redisplay_internal ()
{
struct window *w = XWINDOW (selected_window);
struct window *sw;
/* We have a previously displayed message, but no current
message. Redisplay the previous message. */
display_last_displayed_message_p = 1;
- redisplay_internal (1);
+ redisplay_internal ();
display_last_displayed_message_p = 0;
}
else
- redisplay_internal (1);
+ redisplay_internal ();
if (FRAME_RIF (SELECTED_FRAME ()) != NULL
&& FRAME_RIF (SELECTED_FRAME ())->flush_display_optional)
int start_y = line_bottom_y (&it1);
do {
- move_it_by_lines (&it, 1, 1);
+ move_it_by_lines (&it, 1);
it1 = it;
} while (line_bottom_y (&it1) - start_y < amount_to_scroll);
}
/* If STARTP is unchanged, move it down another screen line. */
if (CHARPOS (it.current.pos) == CHARPOS (startp))
- move_it_by_lines (&it, 1, 1);
+ move_it_by_lines (&it, 1);
startp = it.current.pos;
}
else
{
min_distance = distance;
pos = it.current.pos;
- move_it_by_lines (&it, 1, 0);
+ move_it_by_lines (&it, 1);
}
/* Set the window start there. */
&& PT >= Z - XFASTINT (w->window_end_pos))
{
clear_glyph_matrix (w->desired_matrix);
- move_it_by_lines (&it, 1, 0);
+ move_it_by_lines (&it, 1);
try_window (window, it.current.pos, 0);
}
else if (PT < IT_CHARPOS (it))
{
clear_glyph_matrix (w->desired_matrix);
- move_it_by_lines (&it, -1, 0);
+ move_it_by_lines (&it, -1);
try_window (window, it.current.pos, 0);
}
else