projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5fa0fcf
)
* lisp/progmodes/eglot.el (eglot--pos-to-lsp-position): Improve comment
author
Stephen Leake
<stephen_leake@stephe-leake.org>
Tue, 8 Nov 2022 17:45:26 +0000
(09:45 -0800)
committer
Stephen Leake
<stephen_leake@stephe-leake.org>
Tue, 8 Nov 2022 17:45:26 +0000
(09:45 -0800)
lisp/progmodes/eglot.el
patch
|
blob
|
history
diff --git
a/lisp/progmodes/eglot.el
b/lisp/progmodes/eglot.el
index 204121045a0ee0d1124d1870abab473a6909a97e..ce989b561173916ae785cee7b22a2eea1b35b005 100644
(file)
--- a/
lisp/progmodes/eglot.el
+++ b/
lisp/progmodes/eglot.el
@@
-1426,7
+1426,8
@@
LBP defaults to `line-beginning-position'."
(defun eglot--pos-to-lsp-position (&optional pos)
"Convert point POS to LSP position."
(eglot--widening
- (list :line (1- (line-number-at-pos pos t)) ; F!@&#$CKING OFF-BY-ONE
+ ;; LSP line is zero-origin; emacs is one-origin.
+ (list :line (1- (line-number-at-pos pos t))
:character (progn (when pos (goto-char pos))
(funcall eglot-current-column-function)))))