tag: 1.2
commit a81bb01e370de2c0bbfc74bc879456b08dcb4cc5
Author: João Távora <[email protected]>
Commit: João Távora <[email protected]>
Tweak solution to #125 with a hint from Fangrui Song
* eglot.el (eglot-move-to-lsp-abiding-column): Simplify slightly.
---
eglot.el | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/eglot.el b/eglot.el
index 512e9a6..24f8c97 100644
--- a/eglot.el
+++ b/eglot.el
@@ -752,8 +752,7 @@ managed by those servers.")
2)
2))
until (zerop diff)
- for offset = (max 1 (abs (/ diff 2)))
- do (if (> diff 0) (forward-char offset) (backward-char offset))))
+ do (forward-char (/ (if (> diff 0) (1+ diff) (1- diff)) 2))))
(defun eglot--lsp-position-to-point (pos-plist &optional marker)
"Convert LSP position POS-PLIST to Emacs point.