Message218992
word.tcl in Tcl library contains following lines:
if {$::tcl_platform(platform) eq "windows"} {
# Windows style - any but a unicode space char
set ::tcl_wordchars {\S}
set ::tcl_nonwordchars {\s}
} else {
# Motif style - any unicode word char (number, letter, or underscore)
set ::tcl_wordchars {\w}
set ::tcl_nonwordchars {\W}
}
So by default all works as expected in Motif style, but not in Windows style.
If you want to have same behavior in both styles, defines word chars as:
tk.call('set', 'tcl_wordchars', r'\w')
tk.call('set', 'tcl_nonwordchars', r'\W')
GUI tests are not needed, it is enough to test relevant Tcl commands: tcl_wordBreakAfter, tcl_wordBreakBefore, tcl_endOfWord, tcl_startOfNextWord, and tcl_startOfPreviousWord or TextSelectTo. It's interesting, there are no tests for these functions in Tcl test suite. |
|
Date |
User |
Action |
Args |
2014-05-23 19:33:22 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, terry.reedy |
2014-05-23 19:33:22 | serhiy.storchaka | set | messageid: <1400873602.56.0.0397660388256.issue21474@psf.upfronthosting.co.za> |
2014-05-23 19:33:22 | serhiy.storchaka | link | issue21474 messages |
2014-05-23 19:33:21 | serhiy.storchaka | create | |
|