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

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

[elpa] externals/eglot 8219088 12/16: Close #34: Handle outrageously lar


From: João Távora
Subject: [elpa] externals/eglot 8219088 12/16: Close #34: Handle outrageously large and buggy line numbers
Date: Mon, 9 Jul 2018 17:27:14 -0400 (EDT)

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

    Close #34: Handle outrageously large and buggy line numbers
    
    * eglot.el (eglot--lsp-position-to-point): Truncate line number to
    most-positive-fixnum.
---
 eglot.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/eglot.el b/eglot.el
index 8cad3ad..509fe6c 100644
--- a/eglot.el
+++ b/eglot.el
@@ -602,7 +602,8 @@ CONNECT-ARGS are passed as additional arguments to
   "Convert LSP position POS-PLIST to Emacs point.
 If optional MARKER, return a marker instead"
   (save-excursion (goto-char (point-min))
-                  (forward-line (plist-get pos-plist :line))
+                  (forward-line (min most-positive-fixnum
+                                     (plist-get pos-plist :line)))
                   (forward-char (min (plist-get pos-plist :character)
                                      (- (line-end-position)
                                         (line-beginning-position))))



reply via email to

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