This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients serhiy.storchaka, terry.reedy
Date 2014-05-23.19:33:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1400873602.56.0.0397660388256.issue21474@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-05-23 19:33:22serhiy.storchakasetrecipients: + serhiy.storchaka, terry.reedy
2014-05-23 19:33:22serhiy.storchakasetmessageid: <1400873602.56.0.0397660388256.issue21474@psf.upfronthosting.co.za>
2014-05-23 19:33:22serhiy.storchakalinkissue21474 messages
2014-05-23 19:33:21serhiy.storchakacreate