emacs-diffs
[Top][All Lists]
Advanced

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

feature/long-lines-and-font-locking 2bab0f2db6: Minor update of truncate


From: Eli Zaretskii
Subject: feature/long-lines-and-font-locking 2bab0f2db6: Minor update of truncate-line optimization
Date: Thu, 28 Jul 2022 04:40:23 -0400 (EDT)

branch: feature/long-lines-and-font-locking
commit 2bab0f2db6fff3a99d3bc498d6139ee42aab96ea
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Minor update of truncate-line optimization
    
    * src/xdisp.c (forward_to_next_line_start): Look into display and
    overlay strings only when lines are truncated on display.
---
 src/xdisp.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/xdisp.c b/src/xdisp.c
index 66b37a855b..6237d5a022 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -7266,7 +7266,8 @@ forward_to_next_line_start (struct it *it, bool 
*skipped_p,
 
       if (!no_strings_with_newlines)
        {
-         if (!current_buffer->long_line_optimizations_p)
+         if (!(current_buffer->long_line_optimizations_p
+               && it->line_wrap == TRUNCATE))
            {
              /* Quick-and-dirty check: if there isn't any `display'
                 property in sight, and no overlays, we're done.  */
@@ -7280,10 +7281,10 @@ forward_to_next_line_start (struct it *it, bool 
*skipped_p,
            }
          else
            {
-             /* For buffers with very long lines we try harder,
-                because it's worth our while to spend some time
-                looking into the overlays and 'display' properties
-                to try to avoid iterating through all of them.  */
+             /* For buffers with very long and truncated lines we try
+                harder, because it's worth our while to spend some
+                time looking into the overlays and 'display' properties
+                if we can then avoid iterating through all of them.  */
              no_strings_with_newlines =
                !strings_with_newlines (start, limit, it->w);
            }



reply via email to

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