diff options
| author | Gerd Moellmann | 2001-03-23 16:22:00 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-03-23 16:22:00 +0000 |
| commit | ac90c44f600318090df0f111005dc06f005c8e10 (patch) | |
| tree | 46bc5c8ae99357ed733eedd5faf22f9d218cfe04 /src | |
| parent | ec4054f004dca3f84c30e60646ec5bd71dae9c56 (diff) | |
| download | emacs-ac90c44f600318090df0f111005dc06f005c8e10.tar.gz emacs-ac90c44f600318090df0f111005dc06f005c8e10.zip | |
(try_window_id): Disable rows below the window end.
(try_window_reusing_current_matrix): Use cursor_row_p.
(try_window_reusing_current_matrix) <scrolling up>: Fix disabling
of rows.
(init_from_display_pos): If POS specifies a position in a display
vector, maybe get the iterator set up for that ellipsis.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 8 | ||||
| -rw-r--r-- | src/xdisp.c | 206 |
2 files changed, 128 insertions, 86 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2cd44be9171..c416942165e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,13 @@ | |||
| 1 | 2001-03-23 Gerd Moellmann <gerd@gnu.org> | 1 | 2001-03-23 Gerd Moellmann <gerd@gnu.org> |
| 2 | 2 | ||
| 3 | * xdisp.c Use make_number, for readability. | ||
| 4 | (try_window_id): Disable rows below the window end. | ||
| 5 | (try_window_reusing_current_matrix): Use cursor_row_p. | ||
| 6 | (try_window_reusing_current_matrix) <scrolling up>: Fix disabling | ||
| 7 | of rows. | ||
| 8 | (init_from_display_pos): If POS specifies a position in a display | ||
| 9 | vector, maybe get the iterator set up for that ellipsis. | ||
| 10 | |||
| 3 | * xdisp.c (dump_glyph_row): Fix output for NGLYPHS == 2. | 11 | * xdisp.c (dump_glyph_row): Fix output for NGLYPHS == 2. |
| 4 | 12 | ||
| 5 | 2001-03-23 Eli Zaretskii <eliz@is.elta.co.il> | 13 | 2001-03-23 Eli Zaretskii <eliz@is.elta.co.il> |
diff --git a/src/xdisp.c b/src/xdisp.c index 712860d51e9..f1a66b42da5 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -1749,6 +1749,32 @@ init_from_display_pos (it, w, pos) | |||
| 1749 | struct window *w; | 1749 | struct window *w; |
| 1750 | struct display_pos *pos; | 1750 | struct display_pos *pos; |
| 1751 | { | 1751 | { |
| 1752 | int charpos = CHARPOS (pos->pos), bytepos = BYTEPOS (pos->pos); | ||
| 1753 | Lisp_Object prop, window; | ||
| 1754 | |||
| 1755 | /* If POS specifies a position in a display vector, this might | ||
| 1756 | be for an ellipsis displayed for invisible text. We won't | ||
| 1757 | get the iterator set up for delivering that ellipsis unless | ||
| 1758 | we make sure that it gets aware of the invisible text. */ | ||
| 1759 | if (pos->dpvec_index >= 0 | ||
| 1760 | && pos->overlay_string_index < 0 | ||
| 1761 | && CHARPOS (pos->string_pos) < 0 | ||
| 1762 | && charpos > BEGV | ||
| 1763 | && (XSETWINDOW (window, w), | ||
| 1764 | prop = Fget_char_property (make_number (charpos), | ||
| 1765 | Qinvisible, window), | ||
| 1766 | NILP (prop))) | ||
| 1767 | { | ||
| 1768 | prop = Fget_char_property (make_number (charpos - 1), Qinvisible, | ||
| 1769 | window); | ||
| 1770 | if (TEXT_PROP_MEANS_INVISIBLE (prop) | ||
| 1771 | && TEXT_PROP_MEANS_INVISIBLE_WITH_ELLIPSIS (prop)) | ||
| 1772 | { | ||
| 1773 | --charpos; | ||
| 1774 | bytepos = 0; | ||
| 1775 | } | ||
| 1776 | } | ||
| 1777 | |||
| 1752 | /* Keep in mind: the call to reseat in init_iterator skips invisible | 1778 | /* Keep in mind: the call to reseat in init_iterator skips invisible |
| 1753 | text, so we might end up at a position different from POS. This | 1779 | text, so we might end up at a position different from POS. This |
| 1754 | is only a problem when POS is a row start after a newline and an | 1780 | is only a problem when POS is a row start after a newline and an |
| @@ -1758,8 +1784,8 @@ init_from_display_pos (it, w, pos) | |||
| 1758 | newline before the row start, such a POS will not be in a string, | 1784 | newline before the row start, such a POS will not be in a string, |
| 1759 | but the call to init_iterator below will move us to the | 1785 | but the call to init_iterator below will move us to the |
| 1760 | after-string. */ | 1786 | after-string. */ |
| 1761 | init_iterator (it, w, CHARPOS (pos->pos), BYTEPOS (pos->pos), | 1787 | init_iterator (it, w, charpos, bytepos, NULL, DEFAULT_FACE_ID); |
| 1762 | NULL, DEFAULT_FACE_ID); | 1788 | xassert (IT_CHARPOS (*it) == CHARPOS (pos->pos)); |
| 1763 | 1789 | ||
| 1764 | /* If position is within an overlay string, set up IT to | 1790 | /* If position is within an overlay string, set up IT to |
| 1765 | the right overlay string. */ | 1791 | the right overlay string. */ |
| @@ -1812,15 +1838,27 @@ init_from_display_pos (it, w, pos) | |||
| 1812 | xassert (STRINGP (it->string)); | 1838 | xassert (STRINGP (it->string)); |
| 1813 | } | 1839 | } |
| 1814 | 1840 | ||
| 1815 | /* Restore position in display vector translations or control | 1841 | /* Restore position in display vector translations, control |
| 1816 | character translations. */ | 1842 | character translations or ellipses. */ |
| 1817 | if (pos->dpvec_index >= 0) | 1843 | if (pos->dpvec_index >= 0) |
| 1818 | { | 1844 | { |
| 1819 | /* This fills IT->dpvec. */ | 1845 | if (it->dpvec == NULL) |
| 1820 | get_next_display_element (it); | 1846 | get_next_display_element (it); |
| 1821 | xassert (it->dpvec && it->current.dpvec_index == 0); | 1847 | xassert (it->dpvec && it->current.dpvec_index == 0); |
| 1822 | it->current.dpvec_index = pos->dpvec_index; | 1848 | it->current.dpvec_index = pos->dpvec_index; |
| 1823 | } | 1849 | } |
| 1850 | else if (it->current.dpvec_index >= 0) | ||
| 1851 | { | ||
| 1852 | /* I don't think this can happen, just being paranoid... */ | ||
| 1853 | it->dpvec = NULL; | ||
| 1854 | it->current.dpvec_index = -1; | ||
| 1855 | if (it->s) | ||
| 1856 | it->method = next_element_from_c_string; | ||
| 1857 | else if (STRINGP (it->string)) | ||
| 1858 | it->method = next_element_from_string; | ||
| 1859 | else | ||
| 1860 | it->method = next_element_from_buffer; | ||
| 1861 | } | ||
| 1824 | 1862 | ||
| 1825 | CHECK_IT (it); | 1863 | CHECK_IT (it); |
| 1826 | } | 1864 | } |
| @@ -1936,7 +1974,7 @@ compute_stop_pos (it) | |||
| 1936 | properties. */ | 1974 | properties. */ |
| 1937 | object = it->string; | 1975 | object = it->string; |
| 1938 | limit = Qnil; | 1976 | limit = Qnil; |
| 1939 | XSETFASTINT (position, IT_STRING_CHARPOS (*it)); | 1977 | position = make_number (IT_STRING_CHARPOS (*it)); |
| 1940 | } | 1978 | } |
| 1941 | else | 1979 | else |
| 1942 | { | 1980 | { |
| @@ -1963,8 +2001,8 @@ compute_stop_pos (it) | |||
| 1963 | /* Set up variables for computing the stop position from text | 2001 | /* Set up variables for computing the stop position from text |
| 1964 | property changes. */ | 2002 | property changes. */ |
| 1965 | XSETBUFFER (object, current_buffer); | 2003 | XSETBUFFER (object, current_buffer); |
| 1966 | XSETFASTINT (limit, IT_CHARPOS (*it) + TEXT_PROP_DISTANCE_LIMIT); | 2004 | limit = make_number (IT_CHARPOS (*it) + TEXT_PROP_DISTANCE_LIMIT); |
| 1967 | XSETFASTINT (position, IT_CHARPOS (*it)); | 2005 | position = make_number (IT_CHARPOS (*it)); |
| 1968 | 2006 | ||
| 1969 | } | 2007 | } |
| 1970 | 2008 | ||
| @@ -2409,7 +2447,7 @@ handle_invisible_prop (it) | |||
| 2409 | /* Get the value of the invisible text property at the | 2447 | /* Get the value of the invisible text property at the |
| 2410 | current position. Value will be nil if there is no such | 2448 | current position. Value will be nil if there is no such |
| 2411 | property. */ | 2449 | property. */ |
| 2412 | XSETFASTINT (charpos, IT_STRING_CHARPOS (*it)); | 2450 | charpos = make_number (IT_STRING_CHARPOS (*it)); |
| 2413 | prop = Fget_text_property (charpos, Qinvisible, it->string); | 2451 | prop = Fget_text_property (charpos, Qinvisible, it->string); |
| 2414 | 2452 | ||
| 2415 | if (!NILP (prop) | 2453 | if (!NILP (prop) |
| @@ -2463,7 +2501,7 @@ handle_invisible_prop (it) | |||
| 2463 | Lisp_Object pos, prop; | 2501 | Lisp_Object pos, prop; |
| 2464 | 2502 | ||
| 2465 | /* First of all, is there invisible text at this position? */ | 2503 | /* First of all, is there invisible text at this position? */ |
| 2466 | XSETFASTINT (pos, IT_CHARPOS (*it)); | 2504 | pos = make_number (IT_CHARPOS (*it)); |
| 2467 | prop = Fget_char_property (pos, Qinvisible, it->window); | 2505 | prop = Fget_char_property (pos, Qinvisible, it->window); |
| 2468 | 2506 | ||
| 2469 | /* If we are on invisible text, skip over it. */ | 2507 | /* If we are on invisible text, skip over it. */ |
| @@ -2502,7 +2540,7 @@ handle_invisible_prop (it) | |||
| 2502 | the char before the given position, i.e. if we | 2540 | the char before the given position, i.e. if we |
| 2503 | get visible_p = 1, this means that the char at | 2541 | get visible_p = 1, this means that the char at |
| 2504 | newpos is visible. */ | 2542 | newpos is visible. */ |
| 2505 | XSETFASTINT (pos, newpos); | 2543 | pos = make_number (newpos); |
| 2506 | prop = Fget_char_property (pos, Qinvisible, it->window); | 2544 | prop = Fget_char_property (pos, Qinvisible, it->window); |
| 2507 | visible_p = !TEXT_PROP_MEANS_INVISIBLE (prop); | 2545 | visible_p = !TEXT_PROP_MEANS_INVISIBLE (prop); |
| 2508 | } | 2546 | } |
| @@ -8687,15 +8725,15 @@ redisplay_internal (preserve_echo_area) | |||
| 8687 | mark_window_display_accurate (FRAME_ROOT_WINDOW (sf), 1); | 8725 | mark_window_display_accurate (FRAME_ROOT_WINDOW (sf), 1); |
| 8688 | else | 8726 | else |
| 8689 | { | 8727 | { |
| 8690 | XSETFASTINT (w->last_point, BUF_PT (b)); | 8728 | w->last_point = make_number (BUF_PT (b)); |
| 8691 | w->last_cursor = w->cursor; | 8729 | w->last_cursor = w->cursor; |
| 8692 | w->last_cursor_off_p = w->cursor_off_p; | 8730 | w->last_cursor_off_p = w->cursor_off_p; |
| 8693 | 8731 | ||
| 8694 | b->clip_changed = 0; | 8732 | b->clip_changed = 0; |
| 8695 | b->prevent_redisplay_optimizations_p = 0; | 8733 | b->prevent_redisplay_optimizations_p = 0; |
| 8696 | w->update_mode_line = Qnil; | 8734 | w->update_mode_line = Qnil; |
| 8697 | XSETFASTINT (w->last_modified, BUF_MODIFF (b)); | 8735 | w->last_modified = make_number (BUF_MODIFF (b)); |
| 8698 | XSETFASTINT (w->last_overlay_modified, BUF_OVERLAY_MODIFF (b)); | 8736 | w->last_overlay_modified = make_number (BUF_OVERLAY_MODIFF (b)); |
| 8699 | w->last_had_star | 8737 | w->last_had_star |
| 8700 | = (BUF_MODIFF (XBUFFER (w->buffer)) > BUF_SAVE_MODIFF (XBUFFER (w->buffer)) | 8738 | = (BUF_MODIFF (XBUFFER (w->buffer)) > BUF_SAVE_MODIFF (XBUFFER (w->buffer)) |
| 8701 | ? Qt : Qnil); | 8739 | ? Qt : Qnil); |
| @@ -8839,10 +8877,10 @@ mark_window_display_accurate (window, accurate_p) | |||
| 8839 | { | 8877 | { |
| 8840 | struct buffer *b = XBUFFER (w->buffer); | 8878 | struct buffer *b = XBUFFER (w->buffer); |
| 8841 | 8879 | ||
| 8842 | XSETFASTINT (w->last_modified, | 8880 | w->last_modified |
| 8843 | accurate_p ? BUF_MODIFF (b) : 0); | 8881 | = make_number (accurate_p ? BUF_MODIFF (b) : 0); |
| 8844 | XSETFASTINT (w->last_overlay_modified, | 8882 | w->last_overlay_modified |
| 8845 | accurate_p ? BUF_OVERLAY_MODIFF (b) : 0); | 8883 | = make_number (accurate_p ? BUF_OVERLAY_MODIFF (b) : 0); |
| 8846 | w->last_had_star = (BUF_MODIFF (b) > BUF_SAVE_MODIFF (b) | 8884 | w->last_had_star = (BUF_MODIFF (b) > BUF_SAVE_MODIFF (b) |
| 8847 | ? Qt : Qnil); | 8885 | ? Qt : Qnil); |
| 8848 | 8886 | ||
| @@ -9840,8 +9878,8 @@ redisplay_window (window, just_this_one_p) | |||
| 9840 | startp = run_window_scroll_functions (window, startp); | 9878 | startp = run_window_scroll_functions (window, startp); |
| 9841 | } | 9879 | } |
| 9842 | 9880 | ||
| 9843 | XSETFASTINT (w->last_modified, 0); | 9881 | w->last_modified = make_number (0); |
| 9844 | XSETFASTINT (w->last_overlay_modified, 0); | 9882 | w->last_overlay_modified = make_number (0); |
| 9845 | if (CHARPOS (startp) < BEGV) | 9883 | if (CHARPOS (startp) < BEGV) |
| 9846 | SET_TEXT_POS (startp, BEGV, BEGV_BYTE); | 9884 | SET_TEXT_POS (startp, BEGV, BEGV_BYTE); |
| 9847 | else if (CHARPOS (startp) > ZV) | 9885 | else if (CHARPOS (startp) > ZV) |
| @@ -10010,8 +10048,8 @@ redisplay_window (window, just_this_one_p) | |||
| 10010 | 10048 | ||
| 10011 | try_to_scroll: | 10049 | try_to_scroll: |
| 10012 | 10050 | ||
| 10013 | XSETFASTINT (w->last_modified, 0); | 10051 | w->last_modified = make_number (0); |
| 10014 | XSETFASTINT (w->last_overlay_modified, 0); | 10052 | w->last_overlay_modified = make_number (0); |
| 10015 | 10053 | ||
| 10016 | /* Redisplay the mode line. Select the buffer properly for that. */ | 10054 | /* Redisplay the mode line. Select the buffer properly for that. */ |
| 10017 | if (!update_mode_line) | 10055 | if (!update_mode_line) |
| @@ -10330,18 +10368,17 @@ try_window (window, pos) | |||
| 10330 | xassert (MATRIX_ROW_DISPLAYS_TEXT_P (last_text_row)); | 10368 | xassert (MATRIX_ROW_DISPLAYS_TEXT_P (last_text_row)); |
| 10331 | w->window_end_bytepos | 10369 | w->window_end_bytepos |
| 10332 | = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row); | 10370 | = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row); |
| 10333 | XSETFASTINT (w->window_end_pos, | 10371 | w->window_end_pos |
| 10334 | Z - MATRIX_ROW_END_CHARPOS (last_text_row)); | 10372 | = make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row)); |
| 10335 | XSETFASTINT (w->window_end_vpos, | 10373 | w->window_end_vpos |
| 10336 | MATRIX_ROW_VPOS (last_text_row, w->desired_matrix)); | 10374 | = make_number (MATRIX_ROW_VPOS (last_text_row, w->desired_matrix)); |
| 10337 | xassert (MATRIX_ROW (w->desired_matrix, XFASTINT (w->window_end_vpos)) | 10375 | xassert (MATRIX_ROW (w->desired_matrix, XFASTINT (w->window_end_vpos)) |
| 10338 | ->displays_text_p); | 10376 | ->displays_text_p); |
| 10339 | } | 10377 | } |
| 10340 | else | 10378 | else |
| 10341 | { | 10379 | { |
| 10342 | w->window_end_bytepos = 0; | 10380 | w->window_end_bytepos = 0; |
| 10343 | XSETFASTINT (w->window_end_pos, 0); | 10381 | w->window_end_pos = w->window_end_vpos = make_number (0); |
| 10344 | XSETFASTINT (w->window_end_vpos, 0); | ||
| 10345 | } | 10382 | } |
| 10346 | 10383 | ||
| 10347 | /* But that is not valid info until redisplay finishes. */ | 10384 | /* But that is not valid info until redisplay finishes. */ |
| @@ -10446,8 +10483,7 @@ try_window_reusing_current_matrix (w) | |||
| 10446 | row = MATRIX_FIRST_TEXT_ROW (w->current_matrix); | 10483 | row = MATRIX_FIRST_TEXT_ROW (w->current_matrix); |
| 10447 | while (MATRIX_ROW_DISPLAYS_TEXT_P (row)) | 10484 | while (MATRIX_ROW_DISPLAYS_TEXT_P (row)) |
| 10448 | { | 10485 | { |
| 10449 | if (PT >= MATRIX_ROW_START_CHARPOS (row) | 10486 | if (cursor_row_p (w, row)) |
| 10450 | && PT < MATRIX_ROW_END_CHARPOS (row)) | ||
| 10451 | { | 10487 | { |
| 10452 | set_cursor_from_row (w, row, w->current_matrix, 0, 0, | 10488 | set_cursor_from_row (w, row, w->current_matrix, 0, 0, |
| 10453 | dy, nrows_scrolled); | 10489 | dy, nrows_scrolled); |
| @@ -10540,27 +10576,26 @@ try_window_reusing_current_matrix (w) | |||
| 10540 | { | 10576 | { |
| 10541 | w->window_end_bytepos | 10577 | w->window_end_bytepos |
| 10542 | = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_reused_text_row); | 10578 | = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_reused_text_row); |
| 10543 | XSETFASTINT (w->window_end_pos, | 10579 | w->window_end_pos |
| 10544 | Z - MATRIX_ROW_END_CHARPOS (last_reused_text_row)); | 10580 | = make_number (Z - MATRIX_ROW_END_CHARPOS (last_reused_text_row)); |
| 10545 | XSETFASTINT (w->window_end_vpos, | 10581 | w->window_end_vpos |
| 10546 | MATRIX_ROW_VPOS (last_reused_text_row, | 10582 | = make_number (MATRIX_ROW_VPOS (last_reused_text_row, |
| 10547 | w->current_matrix)); | 10583 | w->current_matrix)); |
| 10548 | } | 10584 | } |
| 10549 | else if (last_text_row) | 10585 | else if (last_text_row) |
| 10550 | { | 10586 | { |
| 10551 | w->window_end_bytepos | 10587 | w->window_end_bytepos |
| 10552 | = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row); | 10588 | = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row); |
| 10553 | XSETFASTINT (w->window_end_pos, | 10589 | w->window_end_pos |
| 10554 | Z - MATRIX_ROW_END_CHARPOS (last_text_row)); | 10590 | = make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row)); |
| 10555 | XSETFASTINT (w->window_end_vpos, | 10591 | w->window_end_vpos |
| 10556 | MATRIX_ROW_VPOS (last_text_row, w->desired_matrix)); | 10592 | = make_number (MATRIX_ROW_VPOS (last_text_row, w->desired_matrix)); |
| 10557 | } | 10593 | } |
| 10558 | else | 10594 | else |
| 10559 | { | 10595 | { |
| 10560 | /* This window must be completely empty. */ | 10596 | /* This window must be completely empty. */ |
| 10561 | w->window_end_bytepos = 0; | 10597 | w->window_end_bytepos = 0; |
| 10562 | XSETFASTINT (w->window_end_pos, 0); | 10598 | w->window_end_pos = w->window_end_vpos = make_number (0); |
| 10563 | XSETFASTINT (w->window_end_vpos, 0); | ||
| 10564 | } | 10599 | } |
| 10565 | w->window_end_valid = Qnil; | 10600 | w->window_end_valid = Qnil; |
| 10566 | 10601 | ||
| @@ -10580,8 +10615,6 @@ try_window_reusing_current_matrix (w) | |||
| 10580 | int dy; | 10615 | int dy; |
| 10581 | int yb = window_text_bottom_y (w); | 10616 | int yb = window_text_bottom_y (w); |
| 10582 | 10617 | ||
| 10583 | IF_DEBUG (debug_method_add (w, "twu2")); | ||
| 10584 | |||
| 10585 | /* Find the row starting at new_start, if there is one. Don't | 10618 | /* Find the row starting at new_start, if there is one. Don't |
| 10586 | reuse a partially visible line at the end. */ | 10619 | reuse a partially visible line at the end. */ |
| 10587 | first_reusable_row = start_row; | 10620 | first_reusable_row = start_row; |
| @@ -10602,15 +10635,13 @@ try_window_reusing_current_matrix (w) | |||
| 10602 | first_reusable_row to the end of the window. Set | 10635 | first_reusable_row to the end of the window. Set |
| 10603 | first_row_to_display to the first row that cannot be reused. | 10636 | first_row_to_display to the first row that cannot be reused. |
| 10604 | Set pt_row to the row containing point, if there is any. */ | 10637 | Set pt_row to the row containing point, if there is any. */ |
| 10605 | first_row_to_display = first_reusable_row; | ||
| 10606 | pt_row = NULL; | 10638 | pt_row = NULL; |
| 10607 | while (MATRIX_ROW_BOTTOM_Y (first_row_to_display) < yb) | 10639 | for (first_row_to_display = first_reusable_row; |
| 10640 | MATRIX_ROW_BOTTOM_Y (first_row_to_display) < yb; | ||
| 10641 | ++first_row_to_display) | ||
| 10608 | { | 10642 | { |
| 10609 | if (PT >= MATRIX_ROW_START_CHARPOS (first_row_to_display) | 10643 | if (cursor_row_p (w, first_row_to_display)) |
| 10610 | && PT < MATRIX_ROW_END_CHARPOS (first_row_to_display)) | ||
| 10611 | pt_row = first_row_to_display; | 10644 | pt_row = first_row_to_display; |
| 10612 | |||
| 10613 | ++first_row_to_display; | ||
| 10614 | } | 10645 | } |
| 10615 | 10646 | ||
| 10616 | /* Start displaying at the start of first_row_to_display. */ | 10647 | /* Start displaying at the start of first_row_to_display. */ |
| @@ -10683,13 +10714,6 @@ try_window_reusing_current_matrix (w) | |||
| 10683 | row->visible_height = row->height; | 10714 | row->visible_height = row->height; |
| 10684 | } | 10715 | } |
| 10685 | 10716 | ||
| 10686 | /* Disable rows not reused. */ | ||
| 10687 | while (row < bottom_row) | ||
| 10688 | { | ||
| 10689 | row->enabled_p = 0; | ||
| 10690 | ++row; | ||
| 10691 | } | ||
| 10692 | |||
| 10693 | /* Scroll the current matrix. */ | 10717 | /* Scroll the current matrix. */ |
| 10694 | xassert (nrows_scrolled > 0); | 10718 | xassert (nrows_scrolled > 0); |
| 10695 | rotate_matrix (w->current_matrix, | 10719 | rotate_matrix (w->current_matrix, |
| @@ -10697,6 +10721,10 @@ try_window_reusing_current_matrix (w) | |||
| 10697 | MATRIX_ROW_VPOS (bottom_row, w->current_matrix), | 10721 | MATRIX_ROW_VPOS (bottom_row, w->current_matrix), |
| 10698 | -nrows_scrolled); | 10722 | -nrows_scrolled); |
| 10699 | 10723 | ||
| 10724 | /* Disable rows not reused. */ | ||
| 10725 | for (row -= nrows_scrolled; row < bottom_row; ++row) | ||
| 10726 | row->enabled_p = 0; | ||
| 10727 | |||
| 10700 | /* Adjust window end. A null value of last_text_row means that | 10728 | /* Adjust window end. A null value of last_text_row means that |
| 10701 | the window end is in reused rows which in turn means that | 10729 | the window end is in reused rows which in turn means that |
| 10702 | only its vpos can have changed. */ | 10730 | only its vpos can have changed. */ |
| @@ -10704,15 +10732,15 @@ try_window_reusing_current_matrix (w) | |||
| 10704 | { | 10732 | { |
| 10705 | w->window_end_bytepos | 10733 | w->window_end_bytepos |
| 10706 | = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row); | 10734 | = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row); |
| 10707 | XSETFASTINT (w->window_end_pos, | 10735 | w->window_end_pos |
| 10708 | Z - MATRIX_ROW_END_CHARPOS (last_text_row)); | 10736 | = make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row)); |
| 10709 | XSETFASTINT (w->window_end_vpos, | 10737 | w->window_end_vpos |
| 10710 | MATRIX_ROW_VPOS (last_text_row, w->desired_matrix)); | 10738 | = make_number (MATRIX_ROW_VPOS (last_text_row, w->desired_matrix)); |
| 10711 | } | 10739 | } |
| 10712 | else | 10740 | else |
| 10713 | { | 10741 | { |
| 10714 | XSETFASTINT (w->window_end_vpos, | 10742 | w->window_end_vpos |
| 10715 | XFASTINT (w->window_end_vpos) - nrows_scrolled); | 10743 | = make_number (XFASTINT (w->window_end_vpos) - nrows_scrolled); |
| 10716 | } | 10744 | } |
| 10717 | 10745 | ||
| 10718 | w->window_end_valid = Qnil; | 10746 | w->window_end_valid = Qnil; |
| @@ -11511,31 +11539,31 @@ try_window_id (w) | |||
| 11511 | first_unchanged_at_end_row); | 11539 | first_unchanged_at_end_row); |
| 11512 | xassert (row && MATRIX_ROW_DISPLAYS_TEXT_P (row)); | 11540 | xassert (row && MATRIX_ROW_DISPLAYS_TEXT_P (row)); |
| 11513 | 11541 | ||
| 11514 | XSETFASTINT (w->window_end_pos, Z - MATRIX_ROW_END_CHARPOS (row)); | 11542 | w->window_end_pos = make_number (Z - MATRIX_ROW_END_CHARPOS (row)); |
| 11515 | w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row); | 11543 | w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row); |
| 11516 | XSETFASTINT (w->window_end_vpos, | 11544 | w->window_end_vpos |
| 11517 | MATRIX_ROW_VPOS (row, w->current_matrix)); | 11545 | = make_number (MATRIX_ROW_VPOS (row, w->current_matrix)); |
| 11518 | } | 11546 | } |
| 11519 | else if (last_text_row_at_end) | 11547 | else if (last_text_row_at_end) |
| 11520 | { | 11548 | { |
| 11521 | XSETFASTINT (w->window_end_pos, | 11549 | w->window_end_pos |
| 11522 | Z - MATRIX_ROW_END_CHARPOS (last_text_row_at_end)); | 11550 | = make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row_at_end)); |
| 11523 | w->window_end_bytepos | 11551 | w->window_end_bytepos |
| 11524 | = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row_at_end); | 11552 | = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row_at_end); |
| 11525 | XSETFASTINT (w->window_end_vpos, | 11553 | w->window_end_vpos |
| 11526 | MATRIX_ROW_VPOS (last_text_row_at_end, desired_matrix)); | 11554 | = make_number (MATRIX_ROW_VPOS (last_text_row_at_end, desired_matrix)); |
| 11527 | } | 11555 | } |
| 11528 | else if (last_text_row) | 11556 | else if (last_text_row) |
| 11529 | { | 11557 | { |
| 11530 | /* We have displayed either to the end of the window or at the | 11558 | /* We have displayed either to the end of the window or at the |
| 11531 | end of the window, i.e. the last row with text is to be found | 11559 | end of the window, i.e. the last row with text is to be found |
| 11532 | in the desired matrix. */ | 11560 | in the desired matrix. */ |
| 11533 | XSETFASTINT (w->window_end_pos, | 11561 | w->window_end_pos |
| 11534 | Z - MATRIX_ROW_END_CHARPOS (last_text_row)); | 11562 | = make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row)); |
| 11535 | w->window_end_bytepos | 11563 | w->window_end_bytepos |
| 11536 | = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row); | 11564 | = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row); |
| 11537 | XSETFASTINT (w->window_end_vpos, | 11565 | w->window_end_vpos |
| 11538 | MATRIX_ROW_VPOS (last_text_row, desired_matrix)); | 11566 | = make_number (MATRIX_ROW_VPOS (last_text_row, desired_matrix)); |
| 11539 | } | 11567 | } |
| 11540 | else if (first_unchanged_at_end_row == NULL | 11568 | else if (first_unchanged_at_end_row == NULL |
| 11541 | && last_text_row == NULL | 11569 | && last_text_row == NULL |
| @@ -11557,6 +11585,12 @@ try_window_id (w) | |||
| 11557 | } | 11585 | } |
| 11558 | else | 11586 | else |
| 11559 | abort (); | 11587 | abort (); |
| 11588 | |||
| 11589 | /* Disable rows below what's displayed in the window. This makes | ||
| 11590 | debugging easier. */ | ||
| 11591 | enable_glyph_matrix_rows (current_matrix, | ||
| 11592 | XFASTINT (w->window_end_vpos) + 1, | ||
| 11593 | bottom_vpos, 0); | ||
| 11560 | 11594 | ||
| 11561 | IF_DEBUG (debug_end_pos = XFASTINT (w->window_end_pos); | 11595 | IF_DEBUG (debug_end_pos = XFASTINT (w->window_end_pos); |
| 11562 | debug_end_vpos = XFASTINT (w->window_end_vpos)); | 11596 | debug_end_vpos = XFASTINT (w->window_end_vpos)); |
| @@ -11892,7 +11926,7 @@ get_overlay_arrow_glyph_row (w) | |||
| 11892 | p += it.len; | 11926 | p += it.len; |
| 11893 | 11927 | ||
| 11894 | /* Get its face. */ | 11928 | /* Get its face. */ |
| 11895 | XSETFASTINT (ilisp, p - arrow_string); | 11929 | ilisp = make_number (p - arrow_string); |
| 11896 | face = Fget_text_property (ilisp, Qface, Voverlay_arrow_string); | 11930 | face = Fget_text_property (ilisp, Qface, Voverlay_arrow_string); |
| 11897 | it.face_id = compute_char_face (f, it.c, face); | 11931 | it.face_id = compute_char_face (f, it.c, face); |
| 11898 | 11932 | ||
| @@ -13486,7 +13520,7 @@ decode_mode_spec (w, c, field_width, precision) | |||
| 13486 | case 'c': | 13520 | case 'c': |
| 13487 | { | 13521 | { |
| 13488 | int col = current_column (); | 13522 | int col = current_column (); |
| 13489 | XSETFASTINT (w->column_number_displayed, col); | 13523 | w->column_number_displayed = make_number (col); |
| 13490 | pint2str (decode_mode_spec_buf, field_width, col); | 13524 | pint2str (decode_mode_spec_buf, field_width, col); |
| 13491 | return decode_mode_spec_buf; | 13525 | return decode_mode_spec_buf; |
| 13492 | } | 13526 | } |
| @@ -13556,8 +13590,8 @@ decode_mode_spec (w, c, field_width, precision) | |||
| 13556 | go back past it. */ | 13590 | go back past it. */ |
| 13557 | if (startpos == BUF_BEGV (b)) | 13591 | if (startpos == BUF_BEGV (b)) |
| 13558 | { | 13592 | { |
| 13559 | XSETFASTINT (w->base_line_number, topline); | 13593 | w->base_line_number = make_number (topline); |
| 13560 | XSETFASTINT (w->base_line_pos, BUF_BEGV (b)); | 13594 | w->base_line_pos = make_number (BUF_BEGV (b)); |
| 13561 | } | 13595 | } |
| 13562 | else if (nlines < height + 25 || nlines > height * 3 + 50 | 13596 | else if (nlines < height + 25 || nlines > height * 3 + 50 |
| 13563 | || linepos == BUF_BEGV (b)) | 13597 | || linepos == BUF_BEGV (b)) |
| @@ -13587,8 +13621,8 @@ decode_mode_spec (w, c, field_width, precision) | |||
| 13587 | goto no_value; | 13621 | goto no_value; |
| 13588 | } | 13622 | } |
| 13589 | 13623 | ||
| 13590 | XSETFASTINT (w->base_line_number, topline - nlines); | 13624 | w->base_line_number = make_number (topline - nlines); |
| 13591 | XSETFASTINT (w->base_line_pos, BYTE_TO_CHAR (position)); | 13625 | w->base_line_pos = make_number (BYTE_TO_CHAR (position)); |
| 13592 | } | 13626 | } |
| 13593 | 13627 | ||
| 13594 | /* Now count lines from the start pos to point. */ | 13628 | /* Now count lines from the start pos to point. */ |
| @@ -14374,7 +14408,7 @@ and is used only on frames for which no explicit name has been set\n\ | |||
| 14374 | "Maximum number of lines to keep in the message log buffer.\n\ | 14408 | "Maximum number of lines to keep in the message log buffer.\n\ |
| 14375 | If nil, disable message logging. If t, log messages but don't truncate\n\ | 14409 | If nil, disable message logging. If t, log messages but don't truncate\n\ |
| 14376 | the buffer when it becomes large."); | 14410 | the buffer when it becomes large."); |
| 14377 | XSETFASTINT (Vmessage_log_max, 50); | 14411 | Vmessage_log_max = make_number (50); |
| 14378 | 14412 | ||
| 14379 | DEFVAR_LISP ("window-size-change-functions", &Vwindow_size_change_functions, | 14413 | DEFVAR_LISP ("window-size-change-functions", &Vwindow_size_change_functions, |
| 14380 | "Functions called before redisplay, if window sizes have changed.\n\ | 14414 | "Functions called before redisplay, if window sizes have changed.\n\ |
| @@ -14498,15 +14532,15 @@ init_xdisp () | |||
| 14498 | struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (root_window))); | 14532 | struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (root_window))); |
| 14499 | int i; | 14533 | int i; |
| 14500 | 14534 | ||
| 14501 | XSETFASTINT (XWINDOW (root_window)->top, FRAME_TOP_MARGIN (f)); | 14535 | XWINDOW (root_window)->top = make_number (FRAME_TOP_MARGIN (f)); |
| 14502 | set_window_height (root_window, | 14536 | set_window_height (root_window, |
| 14503 | FRAME_HEIGHT (f) - 1 - FRAME_TOP_MARGIN (f), | 14537 | FRAME_HEIGHT (f) - 1 - FRAME_TOP_MARGIN (f), |
| 14504 | 0); | 14538 | 0); |
| 14505 | XSETFASTINT (mini_w->top, FRAME_HEIGHT (f) - 1); | 14539 | mini_w->top = make_number (FRAME_HEIGHT (f) - 1); |
| 14506 | set_window_height (minibuf_window, 1, 0); | 14540 | set_window_height (minibuf_window, 1, 0); |
| 14507 | 14541 | ||
| 14508 | XSETFASTINT (XWINDOW (root_window)->width, FRAME_WIDTH (f)); | 14542 | XWINDOW (root_window)->width = make_number (FRAME_WIDTH (f)); |
| 14509 | XSETFASTINT (mini_w->width, FRAME_WIDTH (f)); | 14543 | mini_w->width = make_number (FRAME_WIDTH (f)); |
| 14510 | 14544 | ||
| 14511 | scratch_glyph_row.glyphs[TEXT_AREA] = scratch_glyphs; | 14545 | scratch_glyph_row.glyphs[TEXT_AREA] = scratch_glyphs; |
| 14512 | scratch_glyph_row.glyphs[TEXT_AREA + 1] | 14546 | scratch_glyph_row.glyphs[TEXT_AREA + 1] |
| @@ -14514,7 +14548,7 @@ init_xdisp () | |||
| 14514 | 14548 | ||
| 14515 | /* The default ellipsis glyphs `...'. */ | 14549 | /* The default ellipsis glyphs `...'. */ |
| 14516 | for (i = 0; i < 3; ++i) | 14550 | for (i = 0; i < 3; ++i) |
| 14517 | XSETFASTINT (default_invis_vector[i], '.'); | 14551 | default_invis_vector[i] = make_number ('.'); |
| 14518 | } | 14552 | } |
| 14519 | 14553 | ||
| 14520 | #ifdef HAVE_WINDOW_SYSTEM | 14554 | #ifdef HAVE_WINDOW_SYSTEM |