From: martin rudalics <rudalics@gmx.at>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 12401@debbugs.gnu.org, l26wang@gmail.com
Subject: bug#12401: scroll-preserve-screen-position broken with font height faces
Date: Wed, 12 Sep 2012 10:08:48 +0200 [thread overview]
Message-ID: <50504310.8070505@gmx.at> (raw)
In-Reply-To: <83a9wxlpnc.fsf@gnu.org>
>>> scroll-preserve-screen-position? Is it just that doing N C-v's
>>> followed by N M-v's brings point to the same location where it was
>>> before this sequence of 2N commands?
>> I think this should be the main point, yes.
>
> For this to work, we would need to make sure that C-v followed by M-v
> end up with a window that has the same window-start as the one before
> C-v.
Why?
> But this is impossible to ensure with the way we compute
> window-start, because the move_it family of functions used for that
> can only move forward; therefore moving back is necessarily
> implemented differently, and the results differ when variable-size
> fonts are present.
>
> IOW, this is a limitation of the current design of the
> window-scrolling functions that can only be lifted by redesigning.
I'm completely happy with the following solution: Whenever, after a
sequence of scrolling commands, the original position (that is the
position before the sequence started) reappears in a window, move to
that position and leave the window start position alone. See also
http://lists.gnu.org/archive/html/emacs-devel/2008-02/msg01892.html
martin
next prev parent reply other threads:[~2012-09-12 8:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-10 6:12 bug#12401: scroll-preserve-screen-position broken with font height faces Le Wang
2012-09-10 7:23 ` Eli Zaretskii
2012-09-10 12:37 ` Le Wang
2012-09-10 18:02 ` Eli Zaretskii
2012-09-10 13:26 ` Stefan Monnier
2012-09-10 18:05 ` Eli Zaretskii
2012-09-10 20:42 ` Stefan Monnier
2012-09-12 8:08 ` martin rudalics [this message]
2012-09-12 16:48 ` Eli Zaretskii
2012-09-12 17:38 ` martin rudalics
2022-02-09 9:17 ` Lars Ingebrigtsen
2022-03-09 16:22 ` 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50504310.8070505@gmx.at \
--to=rudalics@gmx.at \
--cc=12401@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=l26wang@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).