mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-06 11:50:51 -08:00
* lisp/progmodes/eglot.el (eglot--pos-to-lsp-position): Improve comment
This commit is contained in:
parent
5fa0fcf18b
commit
5b9b393c61
1 changed files with 2 additions and 1 deletions
|
|
@ -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)))))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue