[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/elpa 38971d3 66/71: Fix #367: don't let M-x fill-paragr
From: |
João Távora |
Subject: |
[elpa] externals/elpa 38971d3 66/71: Fix #367: don't let M-x fill-paragraph break didChange |
Date: |
Wed, 16 Dec 2020 11:42:27 -0500 (EST) |
branch: externals/elpa
commit 38971d3c1d647ab6ad839c3b8585394ea8e53b54
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
Fix #367: don't let M-x fill-paragraph break didChange
M-x fill-paragraph represents some paragraph-fillling changes very
summarily. Filling
1 // foo
2 bar
Into
1 // foo bar
Only makes two changes: a deletion of the "// " and a replacement of a
newline with a space character. The second change fooled Eglot's fix
for #259, by making a change similar to the one it is made to detect
and correct. That fix should taget things that happen on the same
line, this not being one of those things.
* eglot.el (eglot--after-change): Only apply fix to #259 if
case-fiddling happens on same line.
---
eglot.el | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/eglot.el b/eglot.el
index b0bd213..aa89ae9 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1745,10 +1745,15 @@ Records BEG, END and PRE-CHANGE-LENGTH locally."
;; github#259: With `upcase-word' or somesuch,
;; `before-change-functions' always records the whole word's
;; `beg' and `end'. Not only is this longer than needed but
- ;; conflicts with the args received here. Detect this using
- ;; markers recorded earlier and `pre-change-len', then fix it.
+ ;; conflicts with the args received here, which encompass just
+ ;; the parts of the word that changed (if any). We detect this
+ ;; using markers recorded earlier and at looking
+ ;; `pre-change-len'. We also ensure that the before bounds
+ ;; indeed belong to the same line (if we don't, we get could get
+ ;; #367).
(when (and (= b-end b-end-marker) (= b-beg b-beg-marker)
- (not (zerop pre-change-length)))
+ (not (zerop pre-change-length))
+ (= (plist-get lsp-beg :line) (plist-get lsp-end :line)))
(setq lsp-end (eglot--pos-to-lsp-position end)
lsp-beg (eglot--pos-to-lsp-position beg)))
(setcar eglot--recent-changes
- [elpa] externals/elpa 2b16952 44/71: Try to make hover-multiline-doc-locus test pass on Travis, (continued)
- [elpa] externals/elpa 2b16952 44/71: Try to make hover-multiline-doc-locus test pass on Travis, João Távora, 2020/12/16
- [elpa] externals/elpa ac9239b 46/71: Fix small problems around Eglot's help buffer, João Távora, 2020/12/16
- [elpa] externals/elpa 433779d 49/71: * eglot.el (Package-Requires): Require Flymake 1.0.9 and eldoc 1.2.0, João Távora, 2020/12/16
- [elpa] externals/elpa e3ce64a 54/71: Fix #510: use a hash-table for storing resolved completions, João Távora, 2020/12/16
- [elpa] externals/elpa e5fefc7 56/71: Really unbreak eldoc-related tests, João Távora, 2020/12/16
- [elpa] externals/elpa 2172641 65/71: Fix #558: Don't force eglot-strict-mode completely in eglot--dcase, João Távora, 2020/12/16
- [elpa] externals/elpa f9a11fe 63/71: Per #300: Don't send JSON null (Elisp nil) down the wire, João Távora, 2020/12/16
- [elpa] externals/elpa b19b294 64/71: Close #558: handle LSP 3.15's isPreferred code action property, João Távora, 2020/12/16
- [elpa] externals/elpa c34e2f6 50/71: Really install latest dependencies, João Távora, 2020/12/16
- [elpa] externals/elpa 5a2cde9 59/71: Close #511: add built-int support for Godot Engine, João Távora, 2020/12/16
- [elpa] externals/elpa 38971d3 66/71: Fix #367: don't let M-x fill-paragraph break didChange,
João Távora <=
- [elpa] externals/elpa 8dd0a15 67/71: Fix #367: Robustify previous fix of onChange breakage, João Távora, 2020/12/16
- [elpa] externals/elpa a2fa9ab 21/71: Per #408: fontify markdown source code blocks by default, João Távora, 2020/12/16
- [elpa] externals/elpa c9230e8 20/71: Close #408: Declare markdown support iff gfm-view-mode installed, João Távora, 2020/12/16
- [elpa] externals/elpa 3483a2f 10/71: Tests: print contents of *EGLOT ...* buffers in batch mode., João Távora, 2020/12/16
- [elpa] externals/elpa e1e7362 07/71: Fix #445: don't reupdate help buffer if already rendered, João Távora, 2020/12/16
- [elpa] externals/elpa f7a7e33 15/71: Tweak docstring of eglot-server-programs, João Távora, 2020/12/16
- [elpa] externals/elpa eb29f7c 19/71: Close #450: always string-trim markup, João Távora, 2020/12/16
- [elpa] externals/elpa da04fdc 14/71: Close #303: support hierarchical DocumentSymbol in eglot-imenu, João Távora, 2020/12/16
- [elpa] externals/elpa 50f9a69 25/71: Fix #433: survive hover responses with empty markdown strings, João Távora, 2020/12/16
- [elpa] externals/elpa d244cc5 22/71: Per #443: tweak handling of eldoc-echo-area-use-multiline-p, João Távora, 2020/12/16