X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/14fe7b530dc927a88169a841afc0cd806593dea8..15fa4783a39e7a8d99cc6b5e783307c08b25a823:/src/xdisp.c diff --git a/src/xdisp.c b/src/xdisp.c index 1f4c829ce9..b8a8ea7484 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -4641,6 +4641,11 @@ handle_composition_prop (it) && COMPOSITION_VALID_P (start, end, prop) && (STRINGP (it->string) || (PT <= start || PT >= end))) { + if (start < pos) + /* As we can't handle this situation (perhaps, font-lock added + a new composition), we just return here hoping that next + redisplay will detect this composition much earlier. */ + return HANDLED_NORMALLY; if (start != pos) { if (STRINGP (it->string)) @@ -5922,9 +5927,21 @@ get_next_display_element (it) int pos = (it->s ? -1 : STRINGP (it->string) ? IT_STRING_CHARPOS (*it) : IT_CHARPOS (*it)); + int c; + + if (it->what == IT_CHARACTER) + c = it->char_to_display; + else + { + struct composition *cmp = composition_table[it->cmp_it.id]; + int i; - it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display, pos, - it->string); + c = ' '; + for (i = 0; i < cmp->glyph_len; i++) + if ((c = COMPOSITION_GLYPH (cmp, i)) != '\t') + break; + } + it->face_id = FACE_FOR_CHAR (it->f, face, c, pos, it->string); } } #endif @@ -14243,7 +14260,8 @@ try_window_reusing_current_matrix (w) row->visible_height -= min_y - row->y; if (row->y + row->height > max_y) row->visible_height -= row->y + row->height - max_y; - row->redraw_fringe_bitmaps_p = 1; + if (row->fringe_bitmap_periodic_p) + row->redraw_fringe_bitmaps_p = 1; it.current_y += row->height; @@ -14405,7 +14423,8 @@ try_window_reusing_current_matrix (w) row->visible_height -= min_y - row->y; if (row->y + row->height > max_y) row->visible_height -= row->y + row->height - max_y; - row->redraw_fringe_bitmaps_p = 1; + if (row->fringe_bitmap_periodic_p) + row->redraw_fringe_bitmaps_p = 1; } /* Scroll the current matrix. */