[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot 17e0ca4 047/139: Fix Flymake diagnostic positions
From: |
João Távora |
Subject: |
[elpa] externals/eglot 17e0ca4 047/139: Fix Flymake diagnostic positions |
Date: |
Mon, 14 May 2018 09:54:51 -0400 (EDT) |
branch: externals/eglot
commit 17e0ca499e34638d5a52b4daf6b01e06fed3610c
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Fix Flymake diagnostic positions
It's better not to use flymake-diag-region here.
* eglot.el (eglot--textDocument/publishDiagnostics):
Calculate position by hand.
---
eglot.el | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/eglot.el b/eglot.el
index 86c0a4c..bb0427a 100644
--- a/eglot.el
+++ b/eglot.el
@@ -637,10 +637,13 @@ running. INTERACTIVE is t if called interactively."
(with-current-buffer buffer
(cl-flet ((pos-at
(pos-plist)
- (car (flymake-diag-region
- (current-buffer)
- (plist-get pos-plist :line)
- (plist-get pos-plist :character)))))
+ (save-excursion
+ (goto-char (point-min))
+ (forward-line (plist-get pos-plist :line))
+ (forward-char
+ (min (plist-get pos-plist :character)
+ (- (line-end-position)
+ (line-beginning-position)))))))
(cl-loop for diag-spec across diagnostics
collect (cl-destructuring-bind (&key range severity
_code _source message)
- [elpa] externals/eglot be52e1e 037/139: Rework connection restarting again, (continued)
- [elpa] externals/eglot be52e1e 037/139: Rework connection restarting again, João Távora, 2018/05/14
- [elpa] externals/eglot d2eca65 045/139: Fix another Flymake sync bug, João Távora, 2018/05/14
- [elpa] externals/eglot f7f77e1 044/139: Make M-x eglot the main entry point, João Távora, 2018/05/14
- [elpa] externals/eglot d90efdf 001/139: Initial commit, João Távora, 2018/05/14
- [elpa] externals/eglot 1514e0f 052/139: Fix a couple of Rust-related edge cases, João Távora, 2018/05/14
- [elpa] externals/eglot b4dd4f8 022/139: Report server status in the mode-line, João Távora, 2018/05/14
- [elpa] externals/eglot 6689a15 026/139: Add eglot-clear-status interactive command, João Távora, 2018/05/14
- [elpa] externals/eglot a3545fb 050/139: Rename RPC methods for clarity, João Távora, 2018/05/14
- [elpa] externals/eglot 9665a3e 051/139: Fix textDocument/didChange, João Távora, 2018/05/14
- [elpa] externals/eglot eebd32b 059/139: When user declines to reconnect, first quit existing server, João Távora, 2018/05/14
- [elpa] externals/eglot 17e0ca4 047/139: Fix Flymake diagnostic positions,
João Távora <=
- [elpa] externals/eglot 9d404c9 054/139: Update README.md, João Távora, 2018/05/14
- [elpa] externals/eglot 29d4103 056/139: Fix mode-line mouse-clicks from outside selected window, João Távora, 2018/05/14
- [elpa] externals/eglot b1554fc 055/139: * eglot.el (eglot--process-receive): Skip null method notifs., João Távora, 2018/05/14
- [elpa] externals/eglot 51ff863 046/139: Must re-announce didOpen after reconnect, João Távora, 2018/05/14
- [elpa] externals/eglot c95a0a4 041/139: Multiple servers per project are possible, João Távora, 2018/05/14
- [elpa] externals/eglot f8bfb7e 064/139: Handle requests from server correctly, João Távora, 2018/05/14
- [elpa] externals/eglot b69302c 060/139: Make M-x eglot's interactive spec a separate function, João Távora, 2018/05/14
- [elpa] externals/eglot b657b32 068/139: Use rootUri instead of rootPath, João Távora, 2018/05/14
- [elpa] externals/eglot 7d0bf64 062/139: Workaround RLS's regusal to treat nil as empty json object, João Távora, 2018/05/14
- [elpa] externals/eglot 75495dc 033/139: Slightly more user friendly start, João Távora, 2018/05/14