diff options
| author | Gerd Moellmann | 2001-05-11 12:57:41 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-05-11 12:57:41 +0000 |
| commit | 0416532fd4291b4930d0861868f4447960f1625d (patch) | |
| tree | 293bfbe96dcc00eefec68e5bc4a0bd8cccc1c69b /src | |
| parent | 7bd2d083056ae6f24cafb0ddab13103937363c1c (diff) | |
| download | emacs-0416532fd4291b4930d0861868f4447960f1625d.tar.gz emacs-0416532fd4291b4930d0861868f4447960f1625d.zip | |
(try_window_id): Fix computation of window end in
the case that lines were deleted at the end of the window.
Add some more debug_method_adds.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/xdisp.c | 31 |
2 files changed, 25 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2ad1892a423..bda06d04156 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2001-05-11 Gerd Moellmann <gerd@gnu.org> | 1 | 2001-05-11 Gerd Moellmann <gerd@gnu.org> |
| 2 | 2 | ||
| 3 | * xdisp.c (try_window_id): Fix computation of window end in | ||
| 4 | the case that lines were deleted at the end of the window. | ||
| 5 | Add some more debug_method_adds. | ||
| 6 | |||
| 3 | * xfaces.c (try_alternative_families): New function. | 7 | * xfaces.c (try_alternative_families): New function. |
| 4 | (try_font_list): Use it. If ATTRS specifies a family, check | 8 | (try_font_list): Use it. If ATTRS specifies a family, check |
| 5 | fonts from that family first. | 9 | fonts from that family first. |
diff --git a/src/xdisp.c b/src/xdisp.c index 82c5dbc54d5..97f8c81f642 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -11656,6 +11656,7 @@ try_window_id (w) | |||
| 11656 | w->window_end_vpos | 11656 | w->window_end_vpos |
| 11657 | = make_number (MATRIX_ROW_VPOS (row, w->current_matrix)); | 11657 | = make_number (MATRIX_ROW_VPOS (row, w->current_matrix)); |
| 11658 | xassert (w->window_end_bytepos >= 0); | 11658 | xassert (w->window_end_bytepos >= 0); |
| 11659 | IF_DEBUG (debug_method_add (w, "A")); | ||
| 11659 | } | 11660 | } |
| 11660 | else if (last_text_row_at_end) | 11661 | else if (last_text_row_at_end) |
| 11661 | { | 11662 | { |
| @@ -11666,6 +11667,7 @@ try_window_id (w) | |||
| 11666 | w->window_end_vpos | 11667 | w->window_end_vpos |
| 11667 | = make_number (MATRIX_ROW_VPOS (last_text_row_at_end, desired_matrix)); | 11668 | = make_number (MATRIX_ROW_VPOS (last_text_row_at_end, desired_matrix)); |
| 11668 | xassert (w->window_end_bytepos >= 0); | 11669 | xassert (w->window_end_bytepos >= 0); |
| 11670 | IF_DEBUG (debug_method_add (w, "B")); | ||
| 11669 | } | 11671 | } |
| 11670 | else if (last_text_row) | 11672 | else if (last_text_row) |
| 11671 | { | 11673 | { |
| @@ -11686,21 +11688,30 @@ try_window_id (w) | |||
| 11686 | { | 11688 | { |
| 11687 | /* Displayed to end of window, but no line containing text was | 11689 | /* Displayed to end of window, but no line containing text was |
| 11688 | displayed. Lines were deleted at the end of the window. */ | 11690 | displayed. Lines were deleted at the end of the window. */ |
| 11689 | int vpos; | 11691 | int first_vpos = WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0; |
| 11690 | int header_line_p = WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0; | 11692 | int vpos = XFASTINT (w->window_end_vpos); |
| 11691 | 11693 | struct glyph_row *current_row = current_matrix->rows + vpos; | |
| 11692 | for (vpos = XFASTINT (w->window_end_vpos); vpos > 0; --vpos) | 11694 | struct glyph_row *desired_row = desired_matrix->rows + vpos; |
| 11693 | if ((w->desired_matrix->rows[vpos + header_line_p].enabled_p | 11695 | |
| 11694 | && w->desired_matrix->rows[vpos + header_line_p].displays_text_p) | 11696 | for (row = NULL; |
| 11695 | || (!w->desired_matrix->rows[vpos + header_line_p].enabled_p | 11697 | row == NULL && vpos >= first_vpos; |
| 11696 | && w->current_matrix->rows[vpos + header_line_p].displays_text_p)) | 11698 | --vpos, --current_row, --desired_row) |
| 11697 | break; | 11699 | { |
| 11700 | if (desired_row->enabled_p) | ||
| 11701 | { | ||
| 11702 | if (desired_row->displays_text_p) | ||
| 11703 | row = desired_row; | ||
| 11704 | } | ||
| 11705 | else if (current_row->displays_text_p) | ||
| 11706 | row = current_row; | ||
| 11707 | } | ||
| 11698 | 11708 | ||
| 11709 | xassert (row != NULL); | ||
| 11699 | w->window_end_vpos = make_number (vpos); | 11710 | w->window_end_vpos = make_number (vpos); |
| 11700 | row = MATRIX_ROW (w->desired_matrix, vpos); | ||
| 11701 | w->window_end_pos = make_number (Z - MATRIX_ROW_END_CHARPOS (row)); | 11711 | w->window_end_pos = make_number (Z - MATRIX_ROW_END_CHARPOS (row)); |
| 11702 | w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row); | 11712 | w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row); |
| 11703 | xassert (w->window_end_bytepos >= 0); | 11713 | xassert (w->window_end_bytepos >= 0); |
| 11714 | IF_DEBUG (debug_method_add (w, "C")); | ||
| 11704 | } | 11715 | } |
| 11705 | else | 11716 | else |
| 11706 | abort (); | 11717 | abort (); |