[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/elpa 17e0ca4 047/139: Fix Flymake diagnostic positions
From: |
João Távora |
Subject: |
[elpa] externals/elpa 17e0ca4 047/139: Fix Flymake diagnostic positions |
Date: |
Mon, 14 May 2018 09:53:32 -0400 (EDT) |
branch: externals/elpa
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/elpa 1356844 097/139: Fix odd bugs, (continued)
- [elpa] externals/elpa 1356844 097/139: Fix odd bugs, João Távora, 2018/05/14
- [elpa] externals/elpa 889ef20 085/139: Tweak the async request engine., João Távora, 2018/05/14
- [elpa] externals/elpa 1add335 078/139: Workaround two suspected Emacs bugs, João Távora, 2018/05/14
- [elpa] externals/elpa 9d404c9 054/139: Update README.md, João Távora, 2018/05/14
- [elpa] externals/elpa c417eb4 009/139: Cancel timeouts when process dies unexpectedly, João Távora, 2018/05/14
- [elpa] externals/elpa 6689a15 026/139: Add eglot-clear-status interactive command, João Távora, 2018/05/14
- [elpa] externals/elpa 63f2208 030/139: Less obstrusive flymake stuff for now, João Távora, 2018/05/14
- [elpa] externals/elpa 3403f86 027/139: Correctly report what we currently are capable of, João Távora, 2018/05/14
- [elpa] externals/elpa 92bf3a0 038/139: Signal textDocument/didClose, João Távora, 2018/05/14
- [elpa] externals/elpa 7ec0dcf 029/139: Events buffer uses eglot-mode, source buffers use eglot-editing-mode, João Távora, 2018/05/14
- [elpa] externals/elpa 17e0ca4 047/139: Fix Flymake diagnostic positions,
João Távora <=
- [elpa] externals/elpa 0e95167 042/139: Watch for files opened under umbrella of existing process, João Távora, 2018/05/14
- [elpa] externals/elpa 9665a3e 051/139: Fix textDocument/didChange, João Távora, 2018/05/14
- [elpa] externals/elpa 1514e0f 052/139: Fix a couple of Rust-related edge cases, João Távora, 2018/05/14
- [elpa] externals/elpa d90efdf 001/139: Initial commit, João Távora, 2018/05/14
- [elpa] externals/elpa 29d4103 056/139: Fix mode-line mouse-clicks from outside selected window, João Távora, 2018/05/14
- [elpa] externals/elpa ea918ab 066/139: Include source info in diagnostics, João Távora, 2018/05/14
- [elpa] externals/elpa 2b61a3b 048/139: Delete two useless forward declarations, João Távora, 2018/05/14
- [elpa] externals/elpa 7d0bf64 062/139: Workaround RLS's regusal to treat nil as empty json object, João Távora, 2018/05/14
- [elpa] externals/elpa e7ffc31 067/139: Make reported capabilities into its own function, João Távora, 2018/05/14
- [elpa] externals/elpa c2862f4 063/139: Don't auto-reconnect if last attempt lasted less than 3 seconds, João Távora, 2018/05/14