Tk Source Code

Check-in [8a2c92b3]
Login

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

Overview
Comment:Fix text shimmering while a selection is dragged on macOS (see [59d6d5f6c0]): since [3403347da9] every mark, the insertion cursor included, ended the base-char stretch, so the text on each side of the cursor was shaped and placed apart (glyphs moved by up to a pixel on macOS, Arabic lost its joining everywhere). Only embedded windows and images end the stretch now, FinalizeBaseChunk skips zero-width chunks again, as in 9.0, and the block cursor draws the text under it in context. Tests textDisp-42.3 to 42.8.
Downloads: See separate download page
Timelines: family | ancestors | descendants | both | nab-text-mark-stretch
Files: files | file ages | folders
SHA3-256: 8a2c92b32d3bb3d081112a38b82583ec8b66196fd7f21f5c67e7c37bcef985f2
User & Date: nab 2026-11-01 12:04:58.721
References
2026-11-05
20:25 • New ticket [eb6a8f11] X11: the insertion cursor between lam and alef changes the drawing of the Arabic text (textDisp-42.7 fails). artifact: f7184f0d user: serhiy.storchaka
Context
2026-11-01
12:04
Aqua: put the clip edge shared by two ranges of a line on a pixel boundary, rounded towards the logical end of the range, so that a line drawn in several chunks is drawn exactly as the whole line. With an edge inside a pixel, CoreGraphics rendered a few pixels of the glyphs differently (seen in joined Arabic letters at the edge of the selection). Test textDisp-42.9. check-in: c0890f50 user: nab tags: nab-text-mark-stretch
12:04
Fix text shimmering while a selection is dragged on macOS (see [59d6d5f6c0]): since [3403347da9] every mark, the insertion cursor included, ended the base-char stretch, so the text on each side of the cursor was shaped and placed apart (glyphs moved by up to a pixel on macOS, Arabic lost its joining everywhere). Only embedded windows and images end the stretch now, FinalizeBaseChunk skips zero-width chunks again, as in 9.0, and the block cursor draws the text under it in context. Tests textDisp-42.3 to 42.8. check-in: 8a2c92b3 user: nab tags: nab-text-mark-stretch
12:04
Text widget: when the chunks after a line break were thrown away, RemoveFromBaseChunk lengthened the base string again and nothing ended the stretch, so the line above was drawn from a corrupted string, or not at all, when a tag cut the word moved to the next line. Only truncate, and always end the stretch after the cut. Test textDisp-42.2. check-in: e290c778 user: nab tags: nab-text-mark-stretch
Changes
Unified Diff Side-by-Side Diff Patch
Changes to generic/tkTextDisp.c.
Changes to tests/textDisp.test.