|
2026-10-13
| ||
| 04:13 | Fix [5d983ebf48] and [3d6de81648]: speed up the RTL auto-detection of the text widget and keep its pending state per widget. Merge text-rtl-detection (Serhiy Storchaka, with nab-text-rtl-scan): text-46.1 to 46.6, textTag-19.1 to 19.5. check-in: 3a6ffd3b user: nab tags: trunk, main | |
|
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 | |
| 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:24 | • Closed ticket [3d6de816]: Text widget: RTL detection rescans the whole text at each keystroke plus 6 other changes artifact: e447be16 user: nab | |
| 13:18 | • Ticket [3d6de816]: 3 changes artifact: fdd9373c user: serhiy.storchaka | |
| 12:26 | • New ticket [3d6de816]. artifact: 727f21b5 user: nab | |
| Ticket UUID: | 3d6de81648a124e371a2a99512fa0b92a8889311 | |||
| Title: | Text widget: RTL detection rescans the whole text at each keystroke | |||
| Type: | Bug | Version: | trunk | |
| Submitter: | nab | Created on: | 2026-10-08 12:26:08 | |
| Subsystem: | 18. [text] | Assigned To: | nobody | |
| Priority: | 5 Medium | Severity: | Important | |
| Status: | Closed | Last Modified: | 2026-10-08 13:24:34 | |
| Resolution: | Duplicate | Closed By: | nab | |
| Closed on: | 2026-10-08 13:24:34 | |||
| Description: |
Since 8ce823d20c, Three other problems:
Proposed fix: branch
With 10000 lines, a keystroke now costs 3.6 ms instead of 170 ms with Latin text, and 23 ms instead of 128 ms with Hebrew text (macOS). New tests text-46.1 to text-46.6. text-46.1, 46.2, 46.3 and 46.5 fail before the fix (46.5: the tag stayed on a line that became blank). The text tests pass (1797, 0 failed). Not changed: the detection still runs only after typing or pasting (not after deleting, undo, or an insertion by the program), and a line with digits, parentheses or quotes is not considered right-to-left. Checked on macOS (aqua) only. | |||
| User Comments: |
nab added on 2026-10-08 13:24:34:
Sorry, I missed 5d983ebf48: this ticket is a duplicate. Yes, please combine the two in one branch, and thank you for testing on X11 and Windows. A few notes for the combination:
I close this ticket as a duplicate of 5d983ebf48. serhiy.storchaka added on 2026-10-08 13:18:57: This duplicates [5d983ebf48], with a fix in branch text-rtl-detect-speed since 2026-09-24: per-widget pending and detection state, the scan skipped when the text has no RTL characters, and RTL characters extended to all of Bidi_Class R and AL. Your single search -all -regexp over the whole text is better for the cost of a keystroke. I propose to combine the two in one branch: your search and tests text-46.x with the wider character set and the early exit from mine. I can do it, and test it on X11 and Windows. | |||
