Tk Source Code

Check-in [5aae2fcb]
Login

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

Overview
Comment: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.
Downloads: See separate download page
Timelines: family | ancestors | descendants | both | nab-text-rtl-scan
Files: files | file ages | folders
SHA3-256: 5aae2fcb27e2c3cb52c0f6d57ec3de2ec5ed6192d35562855baedb3044362984
User & Date: nab 2026-10-08 12:12:44.998
References
2026-10-08
13:24 • Closed ticket [3d6de816]: Text widget: RTL detection rescans the whole text at each keystroke plus 6 other changes artifact: e447be16 user: nab
12:26 • New ticket [3d6de816]. artifact: 727f21b5 user: nab
Context
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
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
11:44
Fix [061f633f43]: MacOS aqua: <<ContextMenu >> binding sometimes triggers for incorrect toplevel check-in: 3362fcc0 user: jan.nijtmans tags: trunk, main
Changes
Unified Diff Side-by-Side Diff Patch
Changes to library/text.tcl.
Changes to tests/text.test.