Closed cheywood closed 2 years ago
I can replicate this problem, however, only with GTK4 but not with GTK3.
Pasting should trigger an insert-text
event which will set a mark at the position where the text will be inserted and after the insert rechecks the text starting at that mark (functions _before_text_insert
and _after_text_insert
). I see no reason why this should interfere with pasting in any way. Maybe this has something to do with copying decorated text?
Copying and pasting a section of text which includes a misspelled word results in the pasted section being broken up and incorrectly merged with the destination text.
I'll try and explain the behaviour through a set of examples.
Starting with a small example, take a buffer like this
Cut the
asdfasdf
(note the preceding space) and paste it beforeword
. This should result in the following bufferBut instead we get
A slightly longer example, take the following buffer
Cut
valid asdfasdf valid
and paste it beforeword
Expected
Result
I haven't looked into at all yet. Pasting text with misspelled words from elsewhere doesn't appear to trigger the issue.