Tk Source Code

Check-in [c47ce655]
Login

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

Overview
Comment:Fix [5d983ebf48] and [3d6de81648]: speed up the RTL auto-detection of the text widget and fix its per-widget state. Combines branches text-rtl-detect-speed and nab-text-rtl-scan. The text is searched once by the widget (search -all -regexp) instead of a Tcl loop on every line, and the tk_rtl_right tag is changed only where it differs. RTL characters now include all characters with Unicode Bidi_Class R or AL (without U+FEFF), not only U+0590-U+08FF. The pending flag is per widget, and a text recreated under the same name is checked when mapped.
Downloads: See separate download page
Timelines: family | ancestors | descendants | both | text-rtl-detection
Files: files | file ages | folders
SHA3-256: c47ce655fd31e91317b8679104ca0b69ea485b087d0df6d94a7deaa7194b681d
User & Date: serhiy.storchaka 2026-10-08 14:08:08.220
References
2026-10-08
14:10 • Ticket [5d983ebf] Text widget: RTL auto-detection makes mapping and editing slow status still Open with 3 other changes artifact: ea35293e user: serhiy.storchaka
Context
2026-10-09
14:43
Merge trunk closed check-in: f893f7e7 user: jan.nijtmans tags: text-rtl-detection
2026-10-08
14:08
Fix [5d983ebf48] and [3d6de81648]: speed up the RTL auto-detection of the text widget and fix its per-widget state. Combines branches text-rtl-detect-speed and nab-text-rtl-scan. The text is searched once by the widget (search -all -regexp) instead of a Tcl loop on every line, and the tk_rtl_right tag is changed only where it differs. RTL characters now include all characters with Unicode Bidi_Class R or AL (without U+FEFF), not only U+0590-U+08FF. The pending flag is per widget, and a text recreated under the same name is checked when mapped. check-in: c47ce655 user: serhiy.storchaka tags: text-rtl-detection
13:41
Fix [969636]: embedded windows representation offset (horiz.) check-in: 25b94d0e user: jan.nijtmans tags: trunk, main
12:12
Text RTL detection: one regexp search of the text instead of a Tcl loop on every line at each keystroke; tag changed only where needed. Pending detection kept per text: a text destroyed before its idle check no longer stops it in the other texts; every edited text is checked. A text recreated under the same name is checked when mapped (no global variable per path). Tests text-46.1 to 46.6. closed check-in: 5aae2fcb user: nab tags: nab-text-rtl-scan
2026-09-29
08:18
Add tests textTag-19.5 to 19.7 for all RTL character ranges, characters outside them, and punctuation and whitespace in RTL lines [5d983ebf48]. closed check-in: 28f9b9c3 user: serhiy.storchaka tags: text-rtl-detect-speed
Changes
Unified Diff Side-by-Side Diff Patch
Changes to library/text.tcl.
Changes to tests/text.test.
Changes to tests/textTag.test.