12504 |
last_text_row = last_reused_text_row = NULL; |
last_text_row = last_reused_text_row = NULL; |
12505 |
|
|
12506 |
while (it.current_y < it.last_visible_y |
while (it.current_y < it.last_visible_y |
|
&& IT_CHARPOS (it) < CHARPOS (start) |
|
12507 |
&& !fonts_changed_p) |
&& !fonts_changed_p) |
12508 |
if (display_line (&it)) |
{ |
12509 |
last_text_row = it.glyph_row - 1; |
/* If we have reached into the characters in the START row, |
12510 |
|
that means the line boundaries have changed. So we |
12511 |
|
can't start copying with the row START. Maybe it will |
12512 |
|
work to start copying with the following row. */ |
12513 |
|
while (IT_CHARPOS (it) > CHARPOS (start)) |
12514 |
|
{ |
12515 |
|
/* Advance to the next row as the "start". */ |
12516 |
|
start_row++; |
12517 |
|
start = start_row->start.pos; |
12518 |
|
/* If there are no more rows to try, or just one, give up. */ |
12519 |
|
if (start_row == MATRIX_MODE_LINE_ROW (w->current_matrix) - 1 |
12520 |
|
|| w->vscroll || MATRIX_ROW_PARTIALLY_VISIBLE_P (start_row) |
12521 |
|
|| CHARPOS (start) == ZV) |
12522 |
|
{ |
12523 |
|
clear_glyph_matrix (w->desired_matrix); |
12524 |
|
return 0; |
12525 |
|
} |
12526 |
|
|
12527 |
|
start_vpos = MATRIX_ROW_VPOS (start_row, w->current_matrix); |
12528 |
|
} |
12529 |
|
/* If we have reached alignment, |
12530 |
|
we can copy the rest of the rows. */ |
12531 |
|
if (IT_CHARPOS (it) == CHARPOS (start)) |
12532 |
|
break; |
12533 |
|
|
12534 |
|
if (display_line (&it)) |
12535 |
|
last_text_row = it.glyph_row - 1; |
12536 |
|
} |
12537 |
|
|
12538 |
/* A value of current_y < last_visible_y means that we stopped |
/* A value of current_y < last_visible_y means that we stopped |
12539 |
at the previous window start, which in turn means that we |
at the previous window start, which in turn means that we |
12541 |
if (it.current_y < it.last_visible_y) |
if (it.current_y < it.last_visible_y) |
12542 |
{ |
{ |
12543 |
/* IT.vpos always starts from 0; it counts text lines. */ |
/* IT.vpos always starts from 0; it counts text lines. */ |
12544 |
nrows_scrolled = it.vpos; |
nrows_scrolled = it.vpos - (start_row - MATRIX_FIRST_TEXT_ROW (w->current_matrix)); |
12545 |
|
|
12546 |
/* Find PT if not already found in the lines displayed. */ |
/* Find PT if not already found in the lines displayed. */ |
12547 |
if (w->cursor.vpos < 0) |
if (w->cursor.vpos < 0) |
12548 |
{ |
{ |
12549 |
int dy = it.current_y - first_row_y; |
int dy = it.current_y - start_row->y; |
12550 |
|
|
12551 |
row = MATRIX_FIRST_TEXT_ROW (w->current_matrix); |
row = MATRIX_FIRST_TEXT_ROW (w->current_matrix); |
12552 |
row = row_containing_pos (w, PT, row, NULL, dy); |
row = row_containing_pos (w, PT, row, NULL, dy); |
12566 |
scroll_run_hook will clear the cursor, and use the |
scroll_run_hook will clear the cursor, and use the |
12567 |
current matrix to get the height of the row the cursor is |
current matrix to get the height of the row the cursor is |
12568 |
in. */ |
in. */ |
12569 |
run.current_y = first_row_y; |
run.current_y = start_row->y; |
12570 |
run.desired_y = it.current_y; |
run.desired_y = it.current_y; |
12571 |
run.height = it.last_visible_y - it.current_y; |
run.height = it.last_visible_y - it.current_y; |
12572 |
|
|
15461 |
Lisp_Object oprops, aelt; |
Lisp_Object oprops, aelt; |
15462 |
oprops = Ftext_properties_at (make_number (0), elt); |
oprops = Ftext_properties_at (make_number (0), elt); |
15463 |
|
|
15464 |
|
/* If the starting string's properties are not what |
15465 |
|
we want, translate the string. Also, if the string |
15466 |
|
is risky, do that anyway. */ |
15467 |
|
|
15468 |
if (NILP (Fequal (props, oprops)) || risky) |
if (NILP (Fequal (props, oprops)) || risky) |
15469 |
{ |
{ |
15470 |
/* If the starting string has properties, |
/* If the starting string has properties, |