View Issue Details

IDProjectCategoryView StatusLast Update
0034791Lazarus CCRPatchpublic2020-01-13 15:45
ReporterMatthew Shaffer Assigned ToDmitry Boyarintsev  
Status resolvedResolutionfixed 
PlatformLinux x86_64 GTK2OSLinux 
Summary0034791: RichMemo - Avoid Overwriting Selection (IntSaveStream) (GTK2)
DescriptionUnder GTK2, in the function IntSaveStream, RichMemo.SelStart and RichMemo.SelLength are overwitten, causing the last text saved to the stream by this function to be selected on the user's form.

Attached is a patch and an example project.

Short video showing before patch and after patch:

(This is my first patch, so let me know if I've done something wrong. I also don't know if this is the best solution to the bug, but this should at least point you in the right direction to make a better solution if needed)
Steps To ReproduceIn the provided demo project, highlight something, e.g. "Line 2" press the button. Notice that just by reading the RichMemo Rtf property, the selection in the RichMemo has been changed (due to it using streams in the background to write to the Rtf property).

After applying the patch, highlight e.g. "Line 2" and press the button. Your selection should remain the same now.
TagsNo tags attached.
WidgetsetGTK 2
Attached Files


Matthew Shaffer

2019-01-01 22:49


Dmitry Boyarintsev

2020-01-13 15:45

developer   ~0120403

thanks for the patch, applied

Issue History

Date Modified Username Field Change
2019-01-01 22:49 Matthew Shaffer New Issue
2019-01-01 22:49 Matthew Shaffer File Added:
2019-01-29 19:56 Dmitry Boyarintsev Status new => assigned
2019-01-29 19:56 Dmitry Boyarintsev Assigned To => Dmitry Boyarintsev
2020-01-13 15:45 Dmitry Boyarintsev Status assigned => resolved
2020-01-13 15:45 Dmitry Boyarintsev Resolution open => fixed
2020-01-13 15:45 Dmitry Boyarintsev Widgetset GTK 2 => GTK 2
2020-01-13 15:45 Dmitry Boyarintsev Note Added: 0120403