[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot 6e93622 27/69: Fix #273: leniently handle invalid
From: |
João Távora |
Subject: |
[elpa] externals/eglot 6e93622 27/69: Fix #273: leniently handle invalid positions sent by some servers |
Date: |
Sun, 20 Oct 2019 08:21:46 -0400 (EDT) |
branch: externals/eglot
commit 6e936220110b95e037eb4eb06aae3cf1f60a8095
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Fix #273: leniently handle invalid positions sent by some servers
* eglot.el (eglot--lsp-position-to-point): Leniently squash
invalid character positions to 0.
---
eglot.el | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/eglot.el b/eglot.el
index ca63723..d470555 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1020,8 +1020,14 @@ If optional MARKER, return a marker instead"
(forward-line (min most-positive-fixnum
(plist-get pos-plist :line)))
(unless (eobp) ;; if line was excessive leave point at eob
- (let ((tab-width 1))
- (funcall eglot-move-to-column-function (plist-get pos-plist
:character))))
+ (let ((tab-width 1)
+ (col (plist-get pos-plist :character)))
+ (unless (wholenump col)
+ (eglot--warn
+ :eglot "Caution: LSP server sent invalid character position %s.
Using 0 instead."
+ col)
+ (setq col 0))
+ (funcall eglot-move-to-column-function col)))
(if marker (copy-marker (point-marker)) (point))))
(defun eglot--path-to-uri (path)
- [elpa] externals/eglot 4548202 28/69: Simplify eldoc usage (#269), (continued)
- [elpa] externals/eglot 4548202 28/69: Simplify eldoc usage (#269), João Távora, 2019/10/20
- [elpa] externals/eglot 36b7cf32 38/69: Fix #272: also use signature label offsets for parameter info, João Távora, 2019/10/20
- [elpa] externals/eglot 059ea59 43/69: Optionally shutdown after killing last buffer of managed project (#309), João Távora, 2019/10/20
- [elpa] externals/eglot 59ba0b1 39/69: New README section on how to best report bugs to Eglot, João Távora, 2019/10/20
- [elpa] externals/eglot ce983d1 47/69: Revert "Treat null/nil server capabilities as false", João Távora, 2019/10/20
- [elpa] externals/eglot 4693abf 50/69: Fix #258: Allow user to set idle time to wait before processing changes, João Távora, 2019/10/20
- [elpa] externals/eglot 14ab804 54/69: Fix #318: unbreak xref-find-definitions, João Távora, 2019/10/20
- [elpa] externals/eglot dbb5dd4 57/69: Slightly more robust completion tests, João Távora, 2019/10/20
- [elpa] externals/eglot 3604173 64/69: Unbreak eglot--setq-saving if symbol is unbound, João Távora, 2019/10/20
- [elpa] externals/eglot a11a41b 63/69: Use of company-capf backend in eglot-managed buffers, João Távora, 2019/10/20
- [elpa] externals/eglot 6e93622 27/69: Fix #273: leniently handle invalid positions sent by some servers,
João Távora <=
- [elpa] externals/eglot 254fee0 46/69: Use more pyls and less rls in tests, João Távora, 2019/10/20
- [elpa] externals/eglot 0e5e08d 51/69: Support goto-{declaration, implementation, typeDefinition}, João Távora, 2019/10/20
- [elpa] externals/eglot 5a21670 59/69: Fix bug in workspace/didChangeWatchedfiles, João Távora, 2019/10/20
- [elpa] externals/eglot 9359c15 58/69: Close #316: add support for the Ada Language Server, João Távora, 2019/10/20
- [elpa] externals/eglot d6508e0 29/69: Fix #273: fix a typo, João Távora, 2019/10/20
- [elpa] externals/eglot 28ecd5d 34/69: Change the default of eglot-move-to-column-function, João Távora, 2019/10/20
- [elpa] externals/eglot 7a70c97 33/69: Require array package to use current-line (#294), João Távora, 2019/10/20
- [elpa] externals/eglot f7a1bf6 49/69: Fix #236: much less noisy mode line, João Távora, 2019/10/20
- [elpa] externals/eglot 4c5d0d4 53/69: Misc improvements to the xref glue code, João Távora, 2019/10/20
- [elpa] externals/eglot 5ea4049 68/69: Fix #324: let user keep control of some variables during Eglot sessions, João Távora, 2019/10/20