GNU bug report logs -
#14324
24.3; GTK scrollbar doesn't scroll proportionally when Line Wrapping is set to "Truncate Long Lines"
Previous Next
Reported by: j.pertres <at> gmail.com
Date: Tue, 30 Apr 2013 17:09:01 UTC
Severity: wishlist
Tags: confirmed
Found in version 24.3
Full log
View this message in rfc822 format
> 1. Visit a buffer with very long lines, and long enough to make
> Emacs render a vertical scrollbar.
> 2. In the Options menu, set the option "Line Wrapping" to "Truncate
> Long Lines".
> 3. Drag the scrollbar to navigate the file. Emacs won't scroll
> proportionally, but rather get stuck at some points, seemingly at
> those very long lines, maybe as if they were still shown in multiple
> lines, even though now they don't.
Indeed. The scrollbar's thumb is placed based on character positions in
the buffer, which is used as an approximation for the "pixel position"
on the rendering of the buffer.
There are various circumstances where this approximation is poor,
basically when some part of the buffer has a visual size that is
disconnected from its character size, e.g. when you use something like
outline-minor-mode, or when you have (large) images in the buffer, or
when (very long) lines are truncated.
I don't see any easy way to fix it. I fear fixing it would require
a complete redesign of the rendering engine.
We could probably "fix" your case by adding a line-cache, such that
the scrollbar thumb's position can be computed based on line positions
rather than char positions when lines are truncated. Patch welcome.
Stefan
This bug report was last modified 4 years and 11 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.