GNU bug report logs - #70193
eglot: RFE: recenter buffer upon showDocument request

Previous Next

Package: emacs;

Reported by: Alan Donovan <adonovan <at> google.com>

Date: Thu, 4 Apr 2024 13:18:02 UTC

Severity: normal

Full log


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

From: martin rudalics <rudalics <at> gmx.at>
To: Felician Nemeth <felician.nemeth <at> gmail.com>
Cc: Alan Donovan <adonovan <at> google.com>, 70193 <at> debbugs.gnu.org
Subject: Re: bug#70193: Acknowledgement (eglot: RFE: recenter buffer upon
 showDocument request)
Date: Sun, 7 Apr 2024 09:30:02 +0200
[Message part 1 (text/plain, inline)]
> But when I debug window-recenter-region-start-position, the height is
> set to 0.  The patch below seems to fix the problem.
[...]
> +        (body-pixel-width (window-body-width window t))
> +        (body-pixel-height (window-body-height window t))

You're right.  I meanwhile fixed the code to calculate how many lines to
step backwards by using 'window-text-pixel-size' there too.  So now this
should work with text scaling and varying line heights too.

If you want to test it with 'recenter-region', then a rough estimate is
that the number of lines shown after the first "L:" should be equal to
or one less than the number of lines shown after the third "L:" in each
message issued.

Thanks, martin
[recenter-region.el (text/x-emacs-lisp, attachment)]

This bug report was last modified 1 year and 109 days ago.

Previous Next


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