all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: j.pertres@gmail.com
Cc: 14324@debbugs.gnu.org
Subject: bug#14324: 24.3; GTK scrollbar doesn't scroll proportionally when Line Wrapping is set to "Truncate Long Lines"
Date: Thu, 09 May 2013 15:33:20 -0400	[thread overview]
Message-ID: <jwvvc6s55aa.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87ehdseyts.fsf@archaeopteryx.i-did-not-set--mail-host-address--so-tickle-me> (j. pertres's message of "Tue, 30 Apr 2013 19:02:39 +0200")

>   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





  reply	other threads:[~2013-05-09 19:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-30 17:02 bug#14324: 24.3; GTK scrollbar doesn't scroll proportionally when Line Wrapping is set to "Truncate Long Lines" j.pertres
2013-05-09 19:33 ` Stefan Monnier [this message]
2021-05-31  6:03 ` Lars Ingebrigtsen
2021-05-31 15:28   ` Eli Zaretskii
2021-06-01  5:59     ` Lars Ingebrigtsen
2021-06-01 12:28       ` Eli Zaretskii
2021-06-02  5:23         ` Lars Ingebrigtsen
2021-06-02 12:10           ` Eli Zaretskii
2021-06-03  7:12             ` Lars Ingebrigtsen
2021-06-03  8:01               ` Eli Zaretskii
2021-06-03  8:11                 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvvc6s55aa.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=14324@debbugs.gnu.org \
    --cc=j.pertres@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.