bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#56682: locked narrowing


From: Dmitry Gutov
Subject: bug#56682: locked narrowing
Date: Wed, 30 Nov 2022 02:47:41 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 30/11/2022 02:15, Gregory Heytings wrote:

The result will be that the benchmark will report ~30ms both near BOB and near EOB. So the long-lines-threshold thingy adds a regression here.

It's not a regression, it's the price we agreed to pay to detect whether the buffer contains long lines.  That detection happens dynamically, to catch cases when long lines are inserted in a buffer.


After looking at this closely, it turns out that the change in 1c837c42c2 doesn't do what it was meant to do.  Sigh...  Dmitry, can you confirm that the following change fixes this?

diff --git a/src/xdisp.c b/src/xdisp.c
index b09aa6ec96..cdd6a7f5fe 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -19535,7 +19535,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
    /* Check whether the buffer to be displayed contains long lines.  */
    if (!NILP (Vlong_line_threshold)
        && !current_buffer->long_line_optimizations_p
-      && CHARS_MODIFF - CHARS_UNCHANGED_MODIFIED > 8)
+      && CHARS_MODIFF - UNCHANGED_MODIFIED > 8)
      {
        ptrdiff_t cur, next, found, max = 0, threshold;
        threshold = XFIXNUM (Vlong_line_threshold);


Looking good. Thanks, Gregory!






reply via email to

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