diff options
| author | Richard M. Stallman | 1994-03-31 18:40:11 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-03-31 18:40:11 +0000 |
| commit | efc63ef0e1c914daccb5e337c26528430ad6a486 (patch) | |
| tree | 9253007e7136b45d9053e5ff4811b7b7fd940d9c /src | |
| parent | 439fa06f53218d4f0e16ef9c0b01285bdb4c61e4 (diff) | |
| download | emacs-efc63ef0e1c914daccb5e337c26528430ad6a486.tar.gz emacs-efc63ef0e1c914daccb5e337c26528430ad6a486.zip | |
(redisplay): Call frame_up_to_date_hook.
(display_text_line): Pass new arg to compute_char_face.
Fill in charstarts array.
(display_string): Clear part of charstarts array.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 49 |
1 files changed, 45 insertions, 4 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 9244a01bb7f..7b50afa71b1 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -739,7 +739,11 @@ update: | |||
| 739 | { | 739 | { |
| 740 | pause |= update_frame (f, 0, 0); | 740 | pause |= update_frame (f, 0, 0); |
| 741 | if (!pause) | 741 | if (!pause) |
| 742 | mark_window_display_accurate (f->root_window, 1); | 742 | { |
| 743 | mark_window_display_accurate (f->root_window, 1); | ||
| 744 | if (frame_up_to_date_hook != 0) | ||
| 745 | (*frame_up_to_date_hook) (f); | ||
| 746 | } | ||
| 743 | } | 747 | } |
| 744 | } | 748 | } |
| 745 | } | 749 | } |
| @@ -755,8 +759,8 @@ update: | |||
| 755 | above call to update_frame would not have caught it. Catch | 759 | above call to update_frame would not have caught it. Catch |
| 756 | it here. */ | 760 | it here. */ |
| 757 | { | 761 | { |
| 758 | FRAME_PTR mini_frame = | 762 | FRAME_PTR mini_frame |
| 759 | XFRAME (WINDOW_FRAME (XWINDOW (minibuf_window))); | 763 | = XFRAME (WINDOW_FRAME (XWINDOW (minibuf_window))); |
| 760 | 764 | ||
| 761 | if (mini_frame != selected_frame) | 765 | if (mini_frame != selected_frame) |
| 762 | pause |= update_frame (mini_frame, 0, 0); | 766 | pause |= update_frame (mini_frame, 0, 0); |
| @@ -807,6 +811,8 @@ update: | |||
| 807 | w->window_end_valid = Qt; | 811 | w->window_end_valid = Qt; |
| 808 | last_arrow_position = Voverlay_arrow_position; | 812 | last_arrow_position = Voverlay_arrow_position; |
| 809 | last_arrow_string = Voverlay_arrow_string; | 813 | last_arrow_string = Voverlay_arrow_string; |
| 814 | if (frame_up_to_date_hook != 0) | ||
| 815 | (*frame_up_to_date_hook) (selected_frame); | ||
| 810 | } | 816 | } |
| 811 | update_mode_lines = 0; | 817 | update_mode_lines = 0; |
| 812 | windows_or_buffers_changed = 0; | 818 | windows_or_buffers_changed = 0; |
| @@ -1925,6 +1931,8 @@ display_text_line (w, start, vpos, hpos, taboffset) | |||
| 1925 | GLYPH *endp; | 1931 | GLYPH *endp; |
| 1926 | register GLYPH *startp; | 1932 | register GLYPH *startp; |
| 1927 | register GLYPH *p1prev = 0; | 1933 | register GLYPH *p1prev = 0; |
| 1934 | register GLYPH *p1start; | ||
| 1935 | int *charstart; | ||
| 1928 | FRAME_PTR f = XFRAME (w->frame); | 1936 | FRAME_PTR f = XFRAME (w->frame); |
| 1929 | int tab_width = XINT (current_buffer->tab_width); | 1937 | int tab_width = XINT (current_buffer->tab_width); |
| 1930 | int ctl_arrow = !NILP (current_buffer->ctl_arrow); | 1938 | int ctl_arrow = !NILP (current_buffer->ctl_arrow); |
| @@ -1981,6 +1989,7 @@ display_text_line (w, start, vpos, hpos, taboffset) | |||
| 1981 | 1989 | ||
| 1982 | /* The face we're currently using. */ | 1990 | /* The face we're currently using. */ |
| 1983 | int current_face = 0; | 1991 | int current_face = 0; |
| 1992 | int i; | ||
| 1984 | 1993 | ||
| 1985 | XFASTINT (default_invis_vector[2]) = '.'; | 1994 | XFASTINT (default_invis_vector[2]) = '.'; |
| 1986 | default_invis_vector[0] = default_invis_vector[1] = default_invis_vector[2]; | 1995 | default_invis_vector[0] = default_invis_vector[1] = default_invis_vector[2]; |
| @@ -2020,6 +2029,10 @@ display_text_line (w, start, vpos, hpos, taboffset) | |||
| 2020 | 2029 | ||
| 2021 | desired_glyphs->bufp[vpos] = pos; | 2030 | desired_glyphs->bufp[vpos] = pos; |
| 2022 | p1 = desired_glyphs->glyphs[vpos] + hpos; | 2031 | p1 = desired_glyphs->glyphs[vpos] + hpos; |
| 2032 | p1start = p1; | ||
| 2033 | charstart = desired_glyphs->charstarts[vpos] + hpos; | ||
| 2034 | /* In case we don't ever write anything into it... */ | ||
| 2035 | *charstart = -1; | ||
| 2023 | end = ZV; | 2036 | end = ZV; |
| 2024 | startp = desired_glyphs->glyphs[vpos] + XFASTINT (w->left); | 2037 | startp = desired_glyphs->glyphs[vpos] + XFASTINT (w->left); |
| 2025 | endp = startp + width; | 2038 | endp = startp + width; |
| @@ -2042,6 +2055,10 @@ display_text_line (w, start, vpos, hpos, taboffset) | |||
| 2042 | #endif | 2055 | #endif |
| 2043 | while (p1 < endp) | 2056 | while (p1 < endp) |
| 2044 | { | 2057 | { |
| 2058 | /* Record which glyph starts a character, | ||
| 2059 | and the character position of that character. */ | ||
| 2060 | charstart[p1 - p1start] = pos; | ||
| 2061 | |||
| 2045 | p1prev = p1; | 2062 | p1prev = p1; |
| 2046 | if (pos >= pause) | 2063 | if (pos >= pause) |
| 2047 | { | 2064 | { |
| @@ -2098,7 +2115,7 @@ display_text_line (w, start, vpos, hpos, taboffset) | |||
| 2098 | if (pos >= next_face_change && FRAME_X_P (f)) | 2115 | if (pos >= next_face_change && FRAME_X_P (f)) |
| 2099 | current_face = compute_char_face (f, w, pos, | 2116 | current_face = compute_char_face (f, w, pos, |
| 2100 | region_beg, region_end, | 2117 | region_beg, region_end, |
| 2101 | &next_face_change, pos + 50); | 2118 | &next_face_change, pos + 50, 0); |
| 2102 | #endif | 2119 | #endif |
| 2103 | 2120 | ||
| 2104 | pause = end; | 2121 | pause = end; |
| @@ -2225,6 +2242,19 @@ display_text_line (w, start, vpos, hpos, taboffset) | |||
| 2225 | p1++; | 2242 | p1++; |
| 2226 | } | 2243 | } |
| 2227 | 2244 | ||
| 2245 | /* For all the glyphs occupied by this character, except for the | ||
| 2246 | first, store -1 in charstarts. */ | ||
| 2247 | if (p1 != p1prev) | ||
| 2248 | { | ||
| 2249 | int *p2x = &charstart[p1prev - p1start] + 1; | ||
| 2250 | int *p2 = &charstart[p1 - p1start]; | ||
| 2251 | while (p2x != p2) | ||
| 2252 | *p2x++ = -1; | ||
| 2253 | } | ||
| 2254 | else | ||
| 2255 | /* If this character took up no space, | ||
| 2256 | erase all mention of it from charstart. */ | ||
| 2257 | charstart[p1 - p1start] = 0; | ||
| 2228 | pos++; | 2258 | pos++; |
| 2229 | } | 2259 | } |
| 2230 | 2260 | ||
| @@ -2236,6 +2266,12 @@ display_text_line (w, start, vpos, hpos, taboffset) | |||
| 2236 | 2266 | ||
| 2237 | lastpos = pos; | 2267 | lastpos = pos; |
| 2238 | 2268 | ||
| 2269 | /* Store 0 in this charstart line for the positions where | ||
| 2270 | there is no character. But do leave what was recorded | ||
| 2271 | for the character that ended the line. */ | ||
| 2272 | for (i = p1 - p1start + 1; i < endp - p1start; i++) | ||
| 2273 | charstart[i] = 0; | ||
| 2274 | |||
| 2239 | /* Handle continuation in middle of a character */ | 2275 | /* Handle continuation in middle of a character */ |
| 2240 | /* by backing up over it */ | 2276 | /* by backing up over it */ |
| 2241 | if (p1 > endp) | 2277 | if (p1 > endp) |
| @@ -3067,6 +3103,7 @@ display_string (w, vpos, string, length, hpos, truncate, | |||
| 3067 | /* Use the standard display table, not the window's display table. | 3103 | /* Use the standard display table, not the window's display table. |
| 3068 | We don't want the mode line in rot13. */ | 3104 | We don't want the mode line in rot13. */ |
| 3069 | register struct Lisp_Vector *dp = 0; | 3105 | register struct Lisp_Vector *dp = 0; |
| 3106 | int i; | ||
| 3070 | 3107 | ||
| 3071 | if (XTYPE (Vstandard_display_table) == Lisp_Vector | 3108 | if (XTYPE (Vstandard_display_table) == Lisp_Vector |
| 3072 | && XVECTOR (Vstandard_display_table)->size == DISP_TABLE_SIZE) | 3109 | && XVECTOR (Vstandard_display_table)->size == DISP_TABLE_SIZE) |
| @@ -3099,6 +3136,10 @@ display_string (w, vpos, string, length, hpos, truncate, | |||
| 3099 | || (maxcol >= 0 && end - desired_glyphs->glyphs[vpos] > maxcol)) | 3136 | || (maxcol >= 0 && end - desired_glyphs->glyphs[vpos] > maxcol)) |
| 3100 | end = desired_glyphs->glyphs[vpos] + maxcol; | 3137 | end = desired_glyphs->glyphs[vpos] + maxcol; |
| 3101 | 3138 | ||
| 3139 | /* Store 0 in charstart for these columns. */ | ||
| 3140 | for (i = hpos; i < end - p1start + hpos; i++) | ||
| 3141 | desired_glyphs->charstarts[vpos][i] = 0; | ||
| 3142 | |||
| 3102 | if (maxcol >= 0 && mincol > maxcol) | 3143 | if (maxcol >= 0 && mincol > maxcol) |
| 3103 | mincol = maxcol; | 3144 | mincol = maxcol; |
| 3104 | 3145 | ||