emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 92445de 13/20: Optimization in extend_face


From: Jimmy Aguilar Mena
Subject: [Emacs-diffs] master 92445de 13/20: Optimization in extend_face
Date: Mon, 14 Oct 2019 08:32:33 -0400 (EDT)

branch: master
commit 92445de0a41bd138cc5a81cd1038720e20896535
Author: Jimmy Aguilar Mena <address@hidden>
Commit: Jimmy Aguilar Mena <address@hidden>

    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 5f7799e..d99bc43 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]