GNU bug report logs - #48170
next-line on large lines or images skips unexpectedly to next logical line

Previous Next

Package: emacs;

Reported by: Radon Rosborough <radon.neon <at> gmail.com>

Date: Sun, 2 May 2021 20:43:03 UTC

Severity: normal

Tags: moreinfo

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Radon Rosborough <radon.neon <at> gmail.com>
Cc: 48170 <at> debbugs.gnu.org
Subject: bug#48170: next-line on large lines or images skips unexpectedly to next logical line
Date: Mon, 03 May 2021 20:02:00 +0300
> From: Radon Rosborough <radon.neon <at> gmail.com>
> Date: Sun, 2 May 2021 13:41:54 -0700
> 
> The bug is that (under certain circumstances) when using `next-line'
> on a long, visually-wrapped line, instead of moving to the next visual
> line, point moves to the next logical line.
> 
> The "certain circumstances" are as follows:
> 1. Point is within a long logical line that is visually wrapped onto
> at least two visual lines (the visual line containing point, and at
> least one subsequent visual line).
> 2. The window line containing point is the bottom-most window line
> that is fully visible.
> 3. The next window line is partially visible, and the pixel height of
> the visible part of that line is less than the default line height (as
> returned by `default-line-height').

Thanks.  Preliminary analysis indicates that this use case was never
supported, since line-move-visual was introduced in Emacs 23.

This is somewhat tricky to debug (and %$#@! Edebug doesn't help), so
stay tuned.

> I did some debugging in the course of identifying the conditions to
> reproduce the bug, and the problematic behavior seems to come down to
> something in the implementation of `line-move-partial'. There's a
> conditional check (<= this-ypos (- dlh)) in `line-move-partial' that
> gets triggered for certain combinations of window sizes and font
> heights, and the code gated behind this check appears to be buggy,
> resulting in the observed behavior.

In my testing this part is never executed.  And it shouldn't be,
because it handles the case where the window is vscrolled and the
current line starts above the top of the window.  Which is not the
case here, at least not with the default frame size and window that is
not too small.




This bug report was last modified 4 years and 58 days ago.

Previous Next


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