bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#70193: Acknowledgement (eglot: RFE: recenter buffer upon showDocumen


From: Alan Donovan
Subject: bug#70193: Acknowledgement (eglot: RFE: recenter buffer upon showDocument request)
Date: Thu, 4 Apr 2024 09:32:35 -0400

+cc Martin Rudalics (as suggested by Joao Tavora)

On Thu, 4 Apr 2024 at 09:17, Alan Donovan <adonovan@google.com> wrote:
>
> In eglot 1.17, the LSP showDocument downcall opens the designated
> file, moves the cursor to the designated position, and raises the
> frame. One other thing it could do to make it easier to see where the
> cursor is would be to recenter the buffer.
>
> The patch below is a minimal fix; the discussion at
> https://github.com/joaotavora/eglot/discussions/1382 suggests a couple
> of possible refinements.
>
> xtools$ git diff ~/.emacs.d/elpa/eglot-1.17/eglot.el{.bak,}
> --- elpa/eglot-1.17/eglot.el.orig
> +++ elpa/eglot-1.17/eglot.el
> @@ -2460,6 +2460,7 @@ THINGS are either registrations or
> unregisterations (sic)."
>                 ;; function, but `xref--goto-char' happens to have
>                 ;; exactly the semantics we want vis-a-vis widening.
>                 (xref--goto-char beg)
> +              (recenter)
>                 (pulse-momentary-highlight-region beg end 'highlight)))))))
>       (t (setq success :json-false)))
>      `(:success ,success)))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]