GNU bug report logs - #36421
Having some text with face height > 1.0 causes scroll-step to be ignored

Previous Next

Package: emacs;

Reported by: Andrea Cardaci <cyrus.and <at> gmail.com>

Date: Fri, 28 Jun 2019 16:21:02 UTC

Severity: normal

Tags: notabug

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


Message #31 received at 36421 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Andrea Cardaci <cyrus.and <at> gmail.com>
Cc: Juanma Barranquero <lekktu <at> gmail.com>, Eli Zaretskii <eliz <at> gnu.org>,
 36421 <at> debbugs.gnu.org, Pip Cet <pipcet <at> gmail.com>
Subject: Re: bug#36421: Having some text with face height > 1.0 causes
 scroll-step to be ignored
Date: Thu, 04 Jul 2019 16:11:18 -0400
Andrea Cardaci <cyrus.and <at> gmail.com> writes:

>> If you have a lot of higher-than-default lines, and you don't like the
>> effect of scroll-conservatively, then my suggestion is to set
>> scroll-conservatively to 2 or 3.
>
> It's much better this way (set to 2), there are still some
> *unpleasant* moments where the point is not exactly on the bottom (by
> a fraction of line height) and some others where the point is scrolled
> up by one entire line. But I guess this unavoidable, maybe I should
> just stop worrying and love the recentering...

It looks like scroll-down-line does the right thing, maybe a wrapping
command like this would work for you:

    (defun previous-and-maybe-scroll-line (&optional arg)
      (interactive "^p")
      (when (< (line-beginning-position 0) (window-start))
        (condition-case ()
            (scroll-down-line arg)
          (beginning-of-buffer nil))) 
      (previous-line arg))

    (define-key global-map [up] 'previous-and-maybe-scroll-line)

    ;; Corresponding [down] command left as exercise for reader




This bug report was last modified 5 years and 246 days ago.

Previous Next


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