Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix joaotavora#367: Robustify previous fix of onChange breakage
From the in-code comments: ;; github#259 and github#367: With `capitalize-word' or somesuch, ;; `before-change-functions' always records the whole word's `b-beg' ;; and `b-end'. Similarly, when coalescing two lines into one, ;; `fill-paragraph' they mark the end of the first line up to the end ;; of the second line. In both situations, args received here ;; contradict that information: `beg' and `end' will differ by 1 and ;; will likely only encompass the letter that was capitalized or, in ;; the sentence-joining situation, the replacement of the newline with ;; a space. That's we keep markers _and_ positions so we're able to ;; detect and correct this. We ignore `beg', `len' and ;; `pre-change-len' and send "fuller" information about the region ;; from the markers. I've also experimented with doing this ;; unconditionally but it seems to break when newlines are added. * eglot.el (eglot--after-change): Robustify fix.
- Loading branch information