diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-03-23 09:55:06 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-03-23 09:55:06 (GMT) |
commit | 46d899ba95316de0933ecd55fdf36de36ab7b3fe (patch) | |
tree | 36b5c1b2fc8786a45b9a43067ca5d83789a9a4da /library/word.tcl | |
parent | fcc11a1aff2224c6ee48e44c28412af1a2af2e3c (diff) | |
download | tcl-46d899ba95316de0933ecd55fdf36de36ab7b3fe.zip tcl-46d899ba95316de0933ecd55fdf36de36ab7b3fe.tar.gz tcl-46d899ba95316de0933ecd55fdf36de36ab7b3fe.tar.bz2 |
Fix [f1253530cdd83e66]: Different Windows / *nix default bindings for text widget.
Still - most likely - not the complete story for trunk/tcl9, but whatever we do this is a better starting-point than how it was.
Diffstat (limited to 'library/word.tcl')
-rw-r--r-- | library/word.tcl | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/library/word.tcl b/library/word.tcl index 3e4bc3a..0246530 100644 --- a/library/word.tcl +++ b/library/word.tcl @@ -11,24 +11,14 @@ # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # The following variables are used to determine which characters are -# interpreted as white space. +# interpreted as word characters. See bug [f1253530cdd8]. Will +# probably be removed in Tcl 9. -if {$::tcl_platform(platform) eq "windows"} { - # Windows style - any but a unicode space char - if {![info exists ::tcl_wordchars]} { - set ::tcl_wordchars {\S} - } - if {![info exists ::tcl_nonwordchars]} { - set ::tcl_nonwordchars {\s} - } -} else { - # Motif style - any unicode word char (number, letter, or underscore) - if {![info exists ::tcl_wordchars]} { - set ::tcl_wordchars {\w} - } - if {![info exists ::tcl_nonwordchars]} { - set ::tcl_nonwordchars {\W} - } +if {![info exists ::tcl_wordchars]} { + set ::tcl_wordchars {\w} +} +if {![info exists ::tcl_nonwordchars]} { + set ::tcl_nonwordchars {\W} } # Arrange for caches of the real matcher REs to be kept, which enables the REs |