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

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

[elpa] externals/eglot b31ba80 35/45: Tweak solution to #125 with a hint


From: João Távora
Subject: [elpa] externals/eglot b31ba80 35/45: Tweak solution to #125 with a hint from Fangrui Song
Date: Thu, 22 Nov 2018 19:15:32 -0500 (EST)

branch: externals/eglot
commit b31ba809cd824ce05b0131844d7216ae2d276a14
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>

    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]