Bug 3981

Summary: Undo does not restore quoted text color
Product: Claws Mail (GTK 2) Reporter: George <removed-gdpr>
Component: UI/Compose WindowAssignee: users
Status: NEW ---    
Severity: trivial    
Priority: P3    
Version: 3.16.0   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
screencast
none
color quotes in compose window after an undo or paste none

Description George 2018-03-06 00:38:53 UTC
STR:

1. Open to edit some message containing quoted text.
2. Delete some of the colored quoted text
3. Undo

EXPECTED:
Quoted text should be colored properly after Undo

ACTUAL:
All text restored through Undo is the same default color.

Attaching a screencast
Comment 1 George 2018-03-06 00:40:24 UTC
Created attachment 1851 [details]
screencast
Comment 2 George 2018-03-06 00:45:04 UTC
P.S. As it can be seen on the video, after inserting a line before the restored quoted text the colors are restored but not before that.
Comment 3 Martin Kunev 2019-04-05 19:56:45 UTC
The reason for this behavior is that after a change claws updates the colors just for the paragraph following the cursor. As the undo command puts the cursor at the end, the colors are not updated.
Comment 4 Martin Kunev 2019-04-08 21:56:43 UTC
Created attachment 1972 [details]
color quotes in compose window after an undo or paste

I'm attaching a patch. Please give me feedback if anything needs improvement.

Patch description:
Properly color quotes in compose window after an undo or paste action.