Commit 1fe9bee2 authored by Jimmy Aguilar Mena's avatar Jimmy Aguilar Mena

Optimization in extend_face

* src/xdisp.c (extend_face_to_end_of_line) : Optimization to void
calls to face_at_pos.
parent 46e8f703
...@@ -434,7 +434,7 @@ static int ...@@ -434,7 +434,7 @@ static int
fill_column_indicator_column (struct it *it, int char_width) fill_column_indicator_column (struct it *it, int char_width)
{ {
if (Vdisplay_fill_column_indicator if (Vdisplay_fill_column_indicator
&& it->w->pseudo_window_p == 0 && !it->w->pseudo_window_p
&& it->continuation_lines_width == 0 && it->continuation_lines_width == 0
&& CHARACTERP (Vdisplay_fill_column_indicator_character)) && CHARACTERP (Vdisplay_fill_column_indicator_character))
{ {
...@@ -20491,8 +20491,9 @@ extend_face_to_end_of_line (struct it *it) ...@@ -20491,8 +20491,9 @@ extend_face_to_end_of_line (struct it *it)
|| WINDOW_RIGHT_MARGIN_WIDTH (it->w) > 0)) || WINDOW_RIGHT_MARGIN_WIDTH (it->w) > 0))
return; return;
const int extend_face_id const int extend_face_id = (it->face_id == DEFAULT_FACE_ID)
= face_at_pos (it, LFACE_EXTEND_INDEX); ? DEFAULT_FACE_ID
: face_at_pos (it, LFACE_EXTEND_INDEX);
/* Face extension extends the background and box of IT->extend_face_id /* Face extension extends the background and box of IT->extend_face_id
to the end of the line. If the background equals the background to the end of the line. If the background equals the background
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment