Subject: bug#76124: eglot buffer corruption

From: Stefan Monnier <[email-masked]>
Date: Sun, 23 Feb 2025 00:37:46 -0500

>> Place text on first line and type C-c <down>, which invokes
>> 'markdown-move-down'.  The window will scroll, when you scroll up,
>> you'll see the corruption.  The buffer becomes
>> 
>>   * three
>>   \@ four
>>   * one  four

This is very weird.  If at least the NUL byte was between the transposed
regions, but in the middle of one of the two?

>> - The problem happens simplify if you evaluate:
>>
>>      (transpose-regions 1 12 13 27 nil)
>>
>>   in that buffer text (the one, two... example.).

FWIW, I took a look at `transpose-regions` in case there was something
fishy in it.  I saw a problem with handling of text-properties in an
unrelated corner case (fixed on `master`), but nothing that would
explain the above.  🙁

>> - That's all I had time for.

Same here for now,

        Stefan