Tk Source Code

Check-in [edb46a27]
Login

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

Overview
Comment:Fix [cc736f8692]: Ctrl+Left (<<PrevWord>>, <<SelectPrevWord>>, Meta-b, Meta-BackSpace, Meta-Delete) in the text widget skipped a one-character word just before the cursor: TextPrevPos passes "end", the index of the last character, so the word starting there was not found. New ::tk::TextPrevWord appends a space so that "end" is the cursor position. New tests text-42.1 and text-42.2.
Downloads: See separate download page
Timelines: family | ancestors | descendants | both | text-prev-word-one-char
Files: files | file ages | folders
SHA3-256: edb46a273100b6205e9ffbacc1aa6506a0c8c5e119f88ee36718b16164b49294
User & Date: serhiy.storchaka 2026-10-25 10:12:43.294
Original Comment: Ctrl+Left (<<PrevWord>>, <<SelectPrevWord>>, Meta-b, Meta-BackSpace, Meta-Delete) in the text widget skipped a one-character word just before the cursor: TextPrevPos passes "end", the index of the last character, so the word starting there was not found. New ::tk::TextPrevWord appends a space so that "end" is the cursor position. New tests text-42.1 and text-42.2.
Context
2026-10-26
15:05
Simplify the fix for [cc736f8692], now that Tcl ticket 3e7c4a039d is fixed in Tcl: TextPrevPos gets an optional index argument, and TextPrevWord passes "end+1", the cursor position, instead of appending a space. Fix the ICU ::tk::startOfPreviousWord, which returned the position of a space when only spaces preceded the start (e.g. 0 for "\n" 1, 1 for "a \n" 3); it now gives the same results as tcl_startOfPreviousWord. New tests cluster-4.10..4.14. check-in: 2bcf1dec user: serhiy.storchaka tags: text-prev-word-one-char
2026-10-25
10:12
Fix [cc736f8692]: Ctrl+Left (<<PrevWord>>, <<SelectPrevWord>>, Meta-b, Meta-BackSpace, Meta-Delete) in the text widget skipped a one-character word just before the cursor: TextPrevPos passes "end", the index of the last character, so the word starting there was not found. New ::tk::TextPrevWord appends a space so that "end" is the cursor position. New tests text-42.1 and text-42.2. check-in: edb46a27 user: serhiy.storchaka tags: text-prev-word-one-char
2026-10-24
17:10
Fix for [562c3a3da5]: transient windows don't appear on Windows check-in: b56b1a05 user: csaba tags: trunk, main
Changes
Unified Diff Side-by-Side Diff Patch
Changes to library/text.tcl.
Changes to tests/text.test.