emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] 1.2 a81bb01 091/101: Tweak solution to #125 with a hint from Fang


From: Christian Johansson
Subject: [elpa] 1.2 a81bb01 091/101: Tweak solution to #125 with a hint from Fangrui Song
Date: Thu, 29 Apr 2021 15:09:07 -0400 (EDT)

tag: 1.2
commit a81bb01e370de2c0bbfc74bc879456b08dcb4cc5
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>

    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.



reply via email to

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