Mercurial > hg > xemacs-beta
comparison src/redisplay.c @ 94:1040fe1366ac xemacs-20-0f2
Import from CVS: tag xemacs-20-0f2
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:12:09 +0200 |
parents | 364816949b59 |
children | 4be1180a9e89 |
comparison
equal
deleted
inserted
replaced
93:486ff617c2a1 | 94:1040fe1366ac |
---|---|
106 add_emchar_rune(). */ | 106 add_emchar_rune(). */ |
107 Lisp_Object last_charset; /* The charset of the previous character. | 107 Lisp_Object last_charset; /* The charset of the previous character. |
108 Used to optimize some lookups -- we | 108 Used to optimize some lookups -- we |
109 only have to do some things when | 109 only have to do some things when |
110 the charset changes. */ | 110 the charset changes. */ |
111 face_index last_findex; /* The face index of the previous character. | |
112 Needed to ensure the validity of the | |
113 last_charset optimization. */ | |
114 | |
111 int last_char_width; /* The width of the previous character. */ | 115 int last_char_width; /* The width of the previous character. */ |
112 int font_is_bogus; /* If true, it means we couldn't instantiate | 116 int font_is_bogus; /* If true, it means we couldn't instantiate |
113 the font for this charset, so we substitute | 117 the font for this charset, so we substitute |
114 ~'s from the ASCII charset. */ | 118 ~'s from the ASCII charset. */ |
115 Bytind bi_bufpos; | 119 Bytind bi_bufpos; |
848 width = data->blank_width; | 852 width = data->blank_width; |
849 } | 853 } |
850 else | 854 else |
851 { | 855 { |
852 Lisp_Object charset = CHAR_CHARSET (data->ch); | 856 Lisp_Object charset = CHAR_CHARSET (data->ch); |
853 if (!EQ (charset, data->last_charset)) | 857 if (!EQ (charset, data->last_charset) || |
858 data->findex != data->last_findex) | |
854 { | 859 { |
855 /* OK, we need to do things the hard way. */ | 860 /* OK, we need to do things the hard way. */ |
856 struct window *w = XWINDOW (data->window); | 861 struct window *w = XWINDOW (data->window); |
857 struct face_cachel *cachel = WINDOW_FACE_CACHEL (w, data->findex); | 862 struct face_cachel *cachel = WINDOW_FACE_CACHEL (w, data->findex); |
858 Lisp_Object font_instance = | 863 Lisp_Object font_instance = |
874 data->last_char_width = fi->width; | 879 data->last_char_width = fi->width; |
875 else | 880 else |
876 data->last_char_width = -1; | 881 data->last_char_width = -1; |
877 data->new_ascent = max (data->new_ascent, (int) fi->ascent); | 882 data->new_ascent = max (data->new_ascent, (int) fi->ascent); |
878 data->new_descent = max (data->new_descent, (int) fi->descent); | 883 data->new_descent = max (data->new_descent, (int) fi->descent); |
879 /* The following line causes display goobers and I don't know why */ | 884 data->last_charset = charset; |
880 /*data->last_charset = charset;*/ | 885 data->last_findex = data->findex; |
881 } | 886 } |
882 | 887 |
883 width = data->last_char_width; | 888 width = data->last_char_width; |
884 if (width < 0) | 889 if (width < 0) |
885 { | 890 { |
1875 data.dl = dl; | 1880 data.dl = dl; |
1876 | 1881 |
1877 data.bi_bufpos = bi_start_pos; | 1882 data.bi_bufpos = bi_start_pos; |
1878 data.pixpos = dl->bounds.left_in; | 1883 data.pixpos = dl->bounds.left_in; |
1879 data.last_charset = Qunbound; | 1884 data.last_charset = Qunbound; |
1885 data.last_findex = DEFAULT_INDEX; | |
1880 data.result_str = Qnil; | 1886 data.result_str = Qnil; |
1881 | 1887 |
1882 /* Set the right boundary adjusting it to take into account any end | 1888 /* Set the right boundary adjusting it to take into account any end |
1883 glyph. Save the width of the end glyph for later use. */ | 1889 glyph. Save the width of the end glyph for later use. */ |
1884 data.max_pixpos = dl->bounds.right_in; | 1890 data.max_pixpos = dl->bounds.right_in; |
2641 data.max_pixpos = dl->bounds.right_in; | 2647 data.max_pixpos = dl->bounds.right_in; |
2642 data.cursor_type = NO_CURSOR; | 2648 data.cursor_type = NO_CURSOR; |
2643 data.cursor_x = -1; | 2649 data.cursor_x = -1; |
2644 data.findex = DEFAULT_INDEX; | 2650 data.findex = DEFAULT_INDEX; |
2645 data.last_charset = Qunbound; | 2651 data.last_charset = Qunbound; |
2652 data.last_findex = DEFAULT_INDEX; | |
2646 data.result_str = Qnil; | 2653 data.result_str = Qnil; |
2647 | 2654 |
2648 Dynarr_reset (data.db->runes); | 2655 Dynarr_reset (data.db->runes); |
2649 | 2656 |
2650 if (STRINGP (Voverlay_arrow_string)) | 2657 if (STRINGP (Voverlay_arrow_string)) |
3568 data.findex = findex; | 3575 data.findex = findex; |
3569 data.pixpos = min_pixpos; | 3576 data.pixpos = min_pixpos; |
3570 data.max_pixpos = max_pixpos; | 3577 data.max_pixpos = max_pixpos; |
3571 data.cursor_type = NO_CURSOR; | 3578 data.cursor_type = NO_CURSOR; |
3572 data.last_charset = Qunbound; | 3579 data.last_charset = Qunbound; |
3580 data.last_findex = DEFAULT_INDEX; | |
3573 data.result_str = result_str; | 3581 data.result_str = result_str; |
3574 data.is_modeline = 1; | 3582 data.is_modeline = 1; |
3575 XSETWINDOW (data.window, w); | 3583 XSETWINDOW (data.window, w); |
3576 | 3584 |
3577 Dynarr_reset (formatted_string_extent_dynarr); | 3585 Dynarr_reset (formatted_string_extent_dynarr); |