Mercurial > emacs
comparison src/xdisp.c @ 37411:1f10c9e1b850
Comment fixes.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Fri, 20 Apr 2001 19:14:21 +0000 |
parents | 0bef27649ba5 |
children | f56d9b9b3fac |
comparison
equal
deleted
inserted
replaced
37410:614c29893879 | 37411:1f10c9e1b850 |
---|---|
10837 return row_found; | 10837 return row_found; |
10838 } | 10838 } |
10839 | 10839 |
10840 | 10840 |
10841 /* Return the last row in the current matrix of W that is not affected | 10841 /* Return the last row in the current matrix of W that is not affected |
10842 by changes at the start of current_buffer that occurred since the | 10842 by changes at the start of current_buffer that occurred since W's |
10843 last time W was redisplayed. Value is null if no such row exists. | 10843 current matrix was built. Value is null if no such row exists. |
10844 | 10844 |
10845 The global variable beg_unchanged has to contain the number of | 10845 BEG_UNCHANGED us the number of characters unchanged at the start of |
10846 bytes unchanged at the start of current_buffer. BEG + | 10846 current_buffer. BEG + BEG_UNCHANGED is the buffer position of the |
10847 beg_unchanged is the buffer position of the first changed byte in | 10847 first changed character in current_buffer. Characters at positions < |
10848 current_buffer. Characters at positions < BEG + beg_unchanged are | 10848 BEG + BEG_UNCHANGED are at the same buffer positions as they were |
10849 at the same buffer positions as they were when the current matrix | 10849 when the current matrix was built. */ |
10850 was built. */ | |
10851 | 10850 |
10852 static struct glyph_row * | 10851 static struct glyph_row * |
10853 find_last_unchanged_at_beg_row (w) | 10852 find_last_unchanged_at_beg_row (w) |
10854 struct window *w; | 10853 struct window *w; |
10855 { | 10854 { |
10886 return row_found; | 10885 return row_found; |
10887 } | 10886 } |
10888 | 10887 |
10889 | 10888 |
10890 /* Find the first glyph row in the current matrix of W that is not | 10889 /* Find the first glyph row in the current matrix of W that is not |
10891 affected by changes at the end of current_buffer since the last | 10890 affected by changes at the end of current_buffer since the |
10892 time the window was redisplayed. Return in *DELTA the number of | 10891 time W's current matrix was built. |
10893 chars by which buffer positions in unchanged text at the end of | 10892 |
10894 current_buffer must be adjusted. Return in *DELTA_BYTES the | 10893 Return in *DELTA the number of chars by which buffer positions in |
10895 corresponding number of bytes. Value is null if no such row | 10894 unchanged text at the end of current_buffer must be adjusted. |
10896 exists, i.e. all rows are affected by changes. */ | 10895 |
10896 Return in *DELTA_BYTES the corresponding number of bytes. | |
10897 | |
10898 Value is null if no such row exists, i.e. all rows are affected by | |
10899 changes. */ | |
10897 | 10900 |
10898 static struct glyph_row * | 10901 static struct glyph_row * |
10899 find_first_unchanged_at_end_row (w, delta, delta_bytes) | 10902 find_first_unchanged_at_end_row (w, delta, delta_bytes) |
10900 struct window *w; | 10903 struct window *w; |
10901 int *delta, *delta_bytes; | 10904 int *delta, *delta_bytes; |
10936 *delta = Z - Z_old; | 10939 *delta = Z - Z_old; |
10937 *delta_bytes = Z_BYTE - Z_BYTE_old; | 10940 *delta_bytes = Z_BYTE - Z_BYTE_old; |
10938 | 10941 |
10939 /* Set last_unchanged_pos to the buffer position of the last | 10942 /* Set last_unchanged_pos to the buffer position of the last |
10940 character in the buffer that has not been changed. Z is the | 10943 character in the buffer that has not been changed. Z is the |
10941 index + 1 of the last byte in current_buffer, i.e. by | 10944 index + 1 of the last character in current_buffer, i.e. by |
10942 subtracting end_unchanged we get the index of the last | 10945 subtracting END_UNCHANGED we get the index of the last |
10943 unchanged character, and we have to add BEG to get its buffer | 10946 unchanged character, and we have to add BEG to get its buffer |
10944 position. */ | 10947 position. */ |
10945 last_unchanged_pos = Z - END_UNCHANGED + BEG; | 10948 last_unchanged_pos = Z - END_UNCHANGED + BEG; |
10946 last_unchanged_pos_old = last_unchanged_pos - *delta; | 10949 last_unchanged_pos_old = last_unchanged_pos - *delta; |
10947 | 10950 |
11084 becoming fully visible, or because newly displayed lines are displayed | 11087 becoming fully visible, or because newly displayed lines are displayed |
11085 in smaller font sizes. | 11088 in smaller font sizes. |
11086 | 11089 |
11087 7. Update W's window end information. */ | 11090 7. Update W's window end information. */ |
11088 | 11091 |
11089 /* Check that window end is what we expect it to be. */ | |
11090 | |
11091 static int | 11092 static int |
11092 try_window_id (w) | 11093 try_window_id (w) |
11093 struct window *w; | 11094 struct window *w; |
11094 { | 11095 { |
11095 struct frame *f = XFRAME (w->frame); | 11096 struct frame *f = XFRAME (w->frame); |
11141 && FETCH_BYTE (BYTEPOS (start) - 1) == '\n' | 11142 && FETCH_BYTE (BYTEPOS (start) - 1) == '\n' |
11142 && PT < MATRIX_ROW_END_CHARPOS (row)) | 11143 && PT < MATRIX_ROW_END_CHARPOS (row)) |
11143 { | 11144 { |
11144 struct glyph_row *r0 = MATRIX_FIRST_TEXT_ROW (current_matrix); | 11145 struct glyph_row *r0 = MATRIX_FIRST_TEXT_ROW (current_matrix); |
11145 int delta = CHARPOS (start) - MATRIX_ROW_START_CHARPOS (r0); | 11146 int delta = CHARPOS (start) - MATRIX_ROW_START_CHARPOS (r0); |
11146 | 11147 int delta_bytes = BYTEPOS (start) - MATRIX_ROW_START_BYTEPOS (r0); |
11147 if (delta) | 11148 |
11149 if (delta || delta_bytes) | |
11148 { | 11150 { |
11149 struct glyph_row *r1 = MATRIX_BOTTOM_TEXT_ROW (current_matrix, w); | 11151 struct glyph_row *r1 = MATRIX_BOTTOM_TEXT_ROW (current_matrix, w); |
11150 int delta_bytes = BYTEPOS (start) - MATRIX_ROW_START_BYTEPOS (r0); | |
11151 | |
11152 increment_matrix_positions (w->current_matrix, | 11152 increment_matrix_positions (w->current_matrix, |
11153 MATRIX_ROW_VPOS (r0, current_matrix), | 11153 MATRIX_ROW_VPOS (r0, current_matrix), |
11154 MATRIX_ROW_VPOS (r1, current_matrix), | 11154 MATRIX_ROW_VPOS (r1, current_matrix), |
11155 delta, delta_bytes); | 11155 delta, delta_bytes); |
11156 } | 11156 } |