[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#70193: Acknowledgement (eglot: RFE: recenter buffer upon showDocumen
From: |
martin rudalics |
Subject: |
bug#70193: Acknowledgement (eglot: RFE: recenter buffer upon showDocument request) |
Date: |
Fri, 5 Apr 2024 11:07:58 +0200 |
User-agent: |
Mozilla Thunderbird |
> +cc Martin Rudalics (as suggested by Joao Tavora)
I refer to the following text from
https://github.com/joaotavora/eglot/discussions/1382
> A variant of recenter that centers the whole selection if
> (and only if) it fits might be a useful addition, perhaps to the the
> core elisp library. In our case, which I suspect is fairly typical, the
> selection is a single identifier such as a function or type declaration,
> so the behavior of recenter is ideal, as it allows you to see the doc
> comments above the declaration and (at least the start of) the function
> body below it.
The attached 'window-recenter-region-start-position' should address
that. I am not aware of whether we have a function on master to get the
line height of a specific window as if a specific buffer were displayed
in it so I used 'frame-char-height' for the window in question. The
rest of the function is straightforward but there might be off-by-one
glitches.
Roughly tested with the also contained 'recenter-region'.
martin
recenter-region.el
Description: Text Data
- bug#70193: eglot: RFE: recenter buffer upon showDocument request, Alan Donovan, 2024/04/04
- Message not available
- bug#70193: Acknowledgement (eglot: RFE: recenter buffer upon showDocument request), Alan Donovan, 2024/04/04
- bug#70193: Acknowledgement (eglot: RFE: recenter buffer upon showDocument request), Felician Nemeth, 2024/04/04
- bug#70193: Acknowledgement (eglot: RFE: recenter buffer upon showDocument request),
martin rudalics <=
- bug#70193: Acknowledgement (eglot: RFE: recenter buffer upon showDocument request), Felician Nemeth, 2024/04/05
- bug#70193: Acknowledgement (eglot: RFE: recenter buffer upon showDocument request), martin rudalics, 2024/04/07
- bug#70193: Acknowledgement (eglot: RFE: recenter buffer upon showDocument request), Eli Zaretskii, 2024/04/13
- bug#70193: Acknowledgement (eglot: RFE: recenter buffer upon showDocument request), Felician Nemeth, 2024/04/13
- bug#70193: Acknowledgement (eglot: RFE: recenter buffer upon showDocument request), Alan Donovan, 2024/04/13
- bug#70193: [PATCH] Re: bug#70193: Acknowledgement (eglot: RFE: recenter buffer upon showDocument request), Felician Nemeth, 2024/04/17
- bug#70193: [PATCH] Re: bug#70193: Acknowledgement (eglot: RFE: recenter buffer upon showDocument request), João Távora, 2024/04/17
- bug#70193: [PATCH] Re: bug#70193: Acknowledgement (eglot: RFE: recenter buffer upon showDocument request), Felician Nemeth, 2024/04/23
- bug#70193: [PATCH] Re: bug#70193: Acknowledgement (eglot: RFE: recenter buffer upon showDocument request), João Távora, 2024/04/23
- bug#70193: [PATCH] Re: bug#70193: Acknowledgement (eglot: RFE: recenter buffer upon showDocument request), Juri Linkov, 2024/04/24