diff options
author | Felicián Németh <felician.nemeth@gmail.com> | 2024-03-23 18:16:29 +0100 |
---|---|---|
committer | Felicián Németh <felician.nemeth@gmail.com> | 2024-03-23 18:16:29 +0100 |
commit | 5375c5127b1487384ad08f5b3483e6a70cbb3fa4 (patch) | |
tree | d14af46cb7c9b28447417798ad2bdacac514a72a /eglot-x.el | |
parent | 347bcfc81d935d9c93235e69a7ceb21950a728d4 (diff) |
Fix off-by-one bug in displaying Runnables
* eglot-x.el: (xref-localtion-line/xref-loc-runnable): Convert LSP
line number to Emacs line number.
Diffstat (limited to 'eglot-x.el')
-rw-r--r-- | eglot-x.el | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1659,7 +1659,8 @@ Adapted from `eglot--lsp-xref-helper'." (eglot--dbind ((Runnable) location) (xref-loc-runnable-runnable l) (eglot--dbind ((LocationLink) targetRange) location - (plist-get (plist-get targetRange :start) :line)))) + (when-let ((line (plist-get (plist-get targetRange :start) :line))) + (1+ line))))) (cl-defmethod xref-location-marker ((l xref-loc-runnable)) (eglot--dbind ((Runnable) location args) |