From 92445de0a41bd138cc5a81cd1038720e20896535 Mon Sep 17 00:00:00 2001 From: Jimmy Aguilar Mena Date: Sat, 21 Sep 2019 19:57:17 +0200 Subject: [PATCH] Optimization in extend_face * src/xdisp.c (extend_face_to_end_of_line): Optimization to void calls to face_at_pos. --- src/xdisp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 -- 2.39.5