From: Jimmy Aguilar Mena Date: Sat, 21 Sep 2019 17:57:17 +0000 (+0200) Subject: Optimization in extend_face X-Git-Tag: emacs-27.0.90~1077^2~6 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=92445de0a41bd138cc5a81cd1038720e20896535;p=emacs.git Optimization in extend_face * src/xdisp.c (extend_face_to_end_of_line): Optimization to void calls to face_at_pos. --- diff --git a/src/xdisp.c b/src/xdisp.c index 5f7799e5b63..d99bc4323df 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -434,7 +434,7 @@ static int fill_column_indicator_column (struct it *it, int char_width) { if (Vdisplay_fill_column_indicator - && it->w->pseudo_window_p == 0 + && !it->w->pseudo_window_p && it->continuation_lines_width == 0 && CHARACTERP (Vdisplay_fill_column_indicator_character)) { @@ -21581,8 +21581,9 @@ extend_face_to_end_of_line (struct it *it) || WINDOW_RIGHT_MARGIN_WIDTH (it->w) > 0)) return; - const int extend_face_id - = face_at_pos (it, LFACE_EXTEND_INDEX); + const int extend_face_id = (it->face_id == DEFAULT_FACE_ID) + ? DEFAULT_FACE_ID + : face_at_pos (it, LFACE_EXTEND_INDEX); /* Face extension extends the background and box of IT->extend_face_id to the end of the line. If the background equals the background