Re: wxRichTextCtrl caret position does not behave logically when paragraphs contain line breaks (#15730)

16 views
Skip to first unread message

Richard Thomson

unread,
Jul 11, 2026, 7:38:39 PM (10 days ago) Jul 11
to wx-...@googlegroups.com, wxtrac, Author
LegalizeAdulthood left a comment (wxWidgets/wxWidgets#15730)

This appears to be covered by the same fix prepared for #10150.

The fix treats embedded wxRichTextLineBreakChar markers as visual line separators instead of editable trailing spaces. It keeps LineBreak() at the start of the following visual line, adjusts caret movement across the marker, makes MoveToLineEnd() stop before the marker, and preserves the empty visual line after a trailing line-break marker during rich text layout.

The added RichTextCtrlTestCase::LineBreak regression creates text, inserts a line break, verifies that two visual lines exist, verifies that the caret is at position 3 with GetCaretAtLineStart() true, moves left/right across the marker, inserts more text, and verifies the stored text contains the line-break marker.

That matches the behavior requested here: after Shift+Enter, the caret is shown at the beginning of the line after the line break instead of at the end of the previous line.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you authored the thread.Message ID: <wxWidgets/wxWidgets/issues/15730/4949184460@github.com>

VZ

unread,
Jul 19, 2026, 2:20:51 PM (2 days ago) Jul 19
to wx-...@googlegroups.com, wxtrac, Author
vadz left a comment (wxWidgets/wxWidgets#15730)

Sorry, I didn't look at this at all, so I could be missing something obvious, but what is "the same fix prepared for #10150"? Is this something already applied or one of the pending PRs (I couldn't see anything obviously relevant)?


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you authored the thread.Message ID: <wxWidgets/wxWidgets/issues/15730/5016865125@github.com>

Richard Thomson

unread,
Jul 19, 2026, 4:26:52 PM (2 days ago) Jul 19
to wx-...@googlegroups.com, wxtrac, Author
LegalizeAdulthood left a comment (wxWidgets/wxWidgets#15730)

I haven't made a PR for it yet, but it is on my fork here https://github.com/LegalizeAdulthood/wxWidgets/tree/issue-10150


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you authored the thread.Message ID: <wxWidgets/wxWidgets/issues/15730/5017257134@github.com>

Richard Thomson

unread,
Jul 19, 2026, 4:27:22 PM (2 days ago) Jul 19
to wx-...@googlegroups.com, wxtrac, Author
LegalizeAdulthood left a comment (wxWidgets/wxWidgets#15730)

I have many fixes ready, but I didn't want to drown you in PRs, so I'll submit them in batches of 10 or so.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you authored the thread.Message ID: <wxWidgets/wxWidgets/issues/15730/5017258661@github.com>

Reply all
Reply to author
Forward
0 new messages