Tk Source Code

Check-in [a4124a72]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the insertion cursor at the start of a line of right-to-left text (see [59d6d5f6c0]): it was drawn at the left end of the line. ReorderBidiChunks() now also moves the zero-width chunks before a stretch.
Downloads: See separate download page
Timelines: family | ancestors | text-bidi-chunk-order
Files: files | file ages | folders
SHA3-256: a4124a72469ae281c190e124a5ad1894a01d814d5bcd1150ffd951983c5f6e68
User & Date: serhiy.storchaka 2026-10-31 13:50:56.597
References
2026-10-31
13:51 • Ticket [59d6d5f6] Proposed fix for dancing selection in mixed RTL display status still Open with 3 other changes artifact: 9cce42d3 user: serhiy.storchaka
Context
2026-10-31
13:50
Fix the insertion cursor at the start of a line of right-to-left text (see [59d6d5f6c0]): it was drawn at the left end of the line. ReorderBidiChunks() now also moves the zero-width chunks before a stretch. closed check-in: a4124a72 user: serhiy.storchaka tags: text-bidi-chunk-order
2026-10-30
15:12
Fix [f5b47c533f] (see [59d6d5f6c0]): a tag (e.g. the selection) splitting right-to-left text in a text widget made the line scrambled: the font back-end draws a stretch of text in visual order, but its chunks were placed from left to right in logical order, so the bboxes, the selection highlight and the mouse did not match the text and moved whenever the tags changed. Place the chunks of each stretch in visual order (rule L2 of UAX #9), keep the drawing origin of the stretch and measure from the logical positions, and walk the chunks in visual order for the background and @x,y. tk::TextClosestGap: the gap after a right-to-left character is on its left. Tests textDisp-37.4 to 37.6. check-in: 0e34e33c user: serhiy.storchaka tags: text-bidi-chunk-order
Changes
Unified Diff Side-by-Side Diff Patch
Changes to generic/tkTextDisp.c.