GNU bug report logs - #56393
Actually fix the long lines display bug

Previous Next

Package: emacs;

Reported by: Gregory Heytings <gregory <at> heytings.org>

Date: Tue, 5 Jul 2022 08:50:02 UTC

Severity: normal

Done: Gregory Heytings <gregory <at> heytings.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Gregory Heytings <gregory <at> heytings.org>
To: Eli Zaretskii <eliz <at> gnu.org>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 56393 <at> debbugs.gnu.org
Subject: bug#56393: Actually fix the long lines display bug
Date: Sat, 16 Jul 2022 19:39:18 +0000
I just pushed several improvements to the feature branch.

A few comments:

It turns out that it is not possible to calculate the restriction in 
start_display and/or in redisplay_window, because the restriction must 
also be used outside of redisplay.  I tried various approaches, and my 
conclusion is that the best place to calculate the restriction is 
init_iterator.

Using the size of the glyph matrix also turned out to be impractical, 
because the glyph matrix grows when the default font size becomes smaller 
(for example with C-x C-M--) but does not shrink when it becomes larger 
(with C-x C-M-+).  So I've used another formula, still based on 
window_body_{width,height}.

The optimizations now only apply to buffers which contain long lines, so 
the C-u 37100 C-p recipe in xdisp.c works as expected.

I also replaced the WITH_NARROWED_BEGV macro with another one, 
SET_WITH_NARROWED_BEGV.  I'm not convinced that defining another function, 
for example find_newline_no_quit_with_narrowed_begv, would be optimal, 
especially given that there is (in get_visually_first_element) a simple 
assignment that must be evaluated with a narrowed BEGV.




This bug report was last modified 3 years and 33 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.