| 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. | |||
Home
Timeline
Branches
Tags
Forum
Tickets
Download
Wiki