bool string_from_text_prop = false;
/* Don't even try doing anything if called for a mode-line or
- header-line row, since the rest of the code isn't prepared to
- deal with such calamities. */
+ header-line or tab-line row, since the rest of the code isn't
+ prepared to deal with such calamities. */
eassert (!row->mode_line_p);
if (row->mode_line_p)
return false;
else
{
row = MATRIX_ROW (w->current_matrix, w->last_cursor_vpos);
+ /* Skip the tab-line and header-line rows, if any. */
+ if (row->tab_line_p)
+ ++row;
if (row->mode_line_p)
++row;
if (!row->enabled_p)
|| row->mode_line_p)
{
row = w->current_matrix->rows;
+ /* Skip the tab-line and header-line rows, if any. */
+ if (row->tab_line_p)
+ ++row;
if (row->mode_line_p)
++row;
}
;
else if (rc != CURSOR_MOVEMENT_SUCCESS
&& MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row)
- /* Make sure this isn't a header line by any chance, since
- then MATRIX_ROW_PARTIALLY_VISIBLE_P might yield true. */
+ /* Make sure this isn't a header line nor a tab-line by
+ any chance, since then MATRIX_ROW_PARTIALLY_VISIBLE_P
+ might yield true. */
&& !row->mode_line_p
&& !cursor_row_fully_visible_p (w, true, true, true))
{
}
}
/* Finally, fall back on the first row of the window after the
- header line (if any). This is slightly better than not
- displaying the cursor at all. */
+ tab-line and header line (if any). This is slightly better
+ than not displaying the cursor at all. */
if (!row)
{
row = matrix->rows;
+ /* Skip the tab-line and header-line rows, if any. */
+ if (row->tab_line_p)
+ ++row;
if (row->mode_line_p)
++row;
}
ptrdiff_t mindif = BUF_ZV (XBUFFER (w->contents)) + 1;
int last_y;
- /* If we happen to start on a header-line, skip that. */
+ /* If we happen to start on a header-line or a tab-line, skip that. */
+ if (row->tab_line_p)
+ ++row;
if (row->mode_line_p)
++row;
if (STRINGP (it->object)
/* this is not the first row */
&& row > it->w->desired_matrix->rows
- /* previous row is not the header line */
+ /* previous row is not the header line or tab-line */
&& !r1->mode_line_p
/* previous row also ends in a newline from a string */
&& r1->ends_in_newline_from_string_p)