Mercurial > emacs
comparison src/xdisp.c @ 83207:4df500c93e1d
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-552
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-553
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-554
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-555
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-556
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-557
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-27
Use the same directory explicit id-tags as Emacs where possible
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-28
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-29
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-247
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Mon, 20 Sep 2004 09:41:18 +0000 |
parents | 42acc7fa8a4f 645b4e98b84e |
children | b85b19b8eb65 |
comparison
equal
deleted
inserted
replaced
83206:b5dee7c1d483 | 83207:4df500c93e1d |
---|---|
12401 first_row_y = it.current_y; | 12401 first_row_y = it.current_y; |
12402 w->cursor.vpos = -1; | 12402 w->cursor.vpos = -1; |
12403 last_text_row = last_reused_text_row = NULL; | 12403 last_text_row = last_reused_text_row = NULL; |
12404 | 12404 |
12405 while (it.current_y < it.last_visible_y | 12405 while (it.current_y < it.last_visible_y |
12406 && IT_CHARPOS (it) < CHARPOS (start) | |
12407 && !fonts_changed_p) | 12406 && !fonts_changed_p) |
12408 if (display_line (&it)) | 12407 { |
12409 last_text_row = it.glyph_row - 1; | 12408 /* If we have reached into the characters in the START row, |
12409 that means the line boundaries have changed. So we | |
12410 can't start copying with the row START. Maybe it will | |
12411 work to start copying with the following row. */ | |
12412 while (IT_CHARPOS (it) > CHARPOS (start)) | |
12413 { | |
12414 /* Advance to the next row as the "start". */ | |
12415 start_row++; | |
12416 start = start_row->start.pos; | |
12417 /* If there are no more rows to try, or just one, give up. */ | |
12418 if (start_row == MATRIX_MODE_LINE_ROW (w->current_matrix) - 1 | |
12419 || w->vscroll || MATRIX_ROW_PARTIALLY_VISIBLE_P (start_row) | |
12420 || CHARPOS (start) == ZV) | |
12421 { | |
12422 clear_glyph_matrix (w->desired_matrix); | |
12423 return 0; | |
12424 } | |
12425 | |
12426 start_vpos = MATRIX_ROW_VPOS (start_row, w->current_matrix); | |
12427 } | |
12428 /* If we have reached alignment, | |
12429 we can copy the rest of the rows. */ | |
12430 if (IT_CHARPOS (it) == CHARPOS (start)) | |
12431 break; | |
12432 | |
12433 if (display_line (&it)) | |
12434 last_text_row = it.glyph_row - 1; | |
12435 } | |
12410 | 12436 |
12411 /* A value of current_y < last_visible_y means that we stopped | 12437 /* A value of current_y < last_visible_y means that we stopped |
12412 at the previous window start, which in turn means that we | 12438 at the previous window start, which in turn means that we |
12413 have at least one reusable row. */ | 12439 have at least one reusable row. */ |
12414 if (it.current_y < it.last_visible_y) | 12440 if (it.current_y < it.last_visible_y) |
12415 { | 12441 { |
12416 /* IT.vpos always starts from 0; it counts text lines. */ | 12442 /* IT.vpos always starts from 0; it counts text lines. */ |
12417 nrows_scrolled = it.vpos; | 12443 nrows_scrolled = it.vpos - (start_row - MATRIX_FIRST_TEXT_ROW (w->current_matrix)); |
12418 | 12444 |
12419 /* Find PT if not already found in the lines displayed. */ | 12445 /* Find PT if not already found in the lines displayed. */ |
12420 if (w->cursor.vpos < 0) | 12446 if (w->cursor.vpos < 0) |
12421 { | 12447 { |
12422 int dy = it.current_y - first_row_y; | 12448 int dy = it.current_y - start_row->y; |
12423 | 12449 |
12424 row = MATRIX_FIRST_TEXT_ROW (w->current_matrix); | 12450 row = MATRIX_FIRST_TEXT_ROW (w->current_matrix); |
12425 row = row_containing_pos (w, PT, row, NULL, dy); | 12451 row = row_containing_pos (w, PT, row, NULL, dy); |
12426 if (row) | 12452 if (row) |
12427 set_cursor_from_row (w, row, w->current_matrix, 0, 0, | 12453 set_cursor_from_row (w, row, w->current_matrix, 0, 0, |
12437 changed. The problem here is that update has not yet | 12463 changed. The problem here is that update has not yet |
12438 run, i.e. part of the current matrix is not up to date. | 12464 run, i.e. part of the current matrix is not up to date. |
12439 scroll_run_hook will clear the cursor, and use the | 12465 scroll_run_hook will clear the cursor, and use the |
12440 current matrix to get the height of the row the cursor is | 12466 current matrix to get the height of the row the cursor is |
12441 in. */ | 12467 in. */ |
12442 run.current_y = first_row_y; | 12468 run.current_y = start_row->y; |
12443 run.desired_y = it.current_y; | 12469 run.desired_y = it.current_y; |
12444 run.height = it.last_visible_y - it.current_y; | 12470 run.height = it.last_visible_y - it.current_y; |
12445 | 12471 |
12446 if (run.height > 0 && run.current_y != run.desired_y) | 12472 if (run.height > 0 && run.current_y != run.desired_y) |
12447 { | 12473 { |
15331 | 15357 |
15332 if (!NILP (props) || risky) | 15358 if (!NILP (props) || risky) |
15333 { | 15359 { |
15334 Lisp_Object oprops, aelt; | 15360 Lisp_Object oprops, aelt; |
15335 oprops = Ftext_properties_at (make_number (0), elt); | 15361 oprops = Ftext_properties_at (make_number (0), elt); |
15362 | |
15363 /* If the starting string's properties are not what | |
15364 we want, translate the string. Also, if the string | |
15365 is risky, do that anyway. */ | |
15336 | 15366 |
15337 if (NILP (Fequal (props, oprops)) || risky) | 15367 if (NILP (Fequal (props, oprops)) || risky) |
15338 { | 15368 { |
15339 /* If the starting string has properties, | 15369 /* If the starting string has properties, |
15340 merge the specified ones onto the existing ones. */ | 15370 merge the specified ones onto the existing ones. */ |