summaryrefslogtreecommitdiffstats
path: root/library/tk.tcl
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-03-19 16:36:00 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-03-19 16:36:00 (GMT)
commit6163e7ad2b7623710bf1984e74b685d1c3f7436b (patch)
tree9621b933baadae48762d7e3c5b4b7cd4490c0f09 /library/tk.tcl
parent48c0ad4a83d8898e5414d6c2815a55905b7bb6ac (diff)
downloadtk-6163e7ad2b7623710bf1984e74b685d1c3f7436b.zip
tk-6163e7ad2b7623710bf1984e74b685d1c3f7436b.tar.gz
tk-6163e7ad2b7623710bf1984e74b685d1c3f7436b.tar.bz2
Define ::tk::startOfCluster/::tk::endOfCluster directly for MacOS
Diffstat (limited to 'library/tk.tcl')
-rw-r--r--library/tk.tcl11
1 files changed, 3 insertions, 8 deletions
diff --git a/library/tk.tcl b/library/tk.tcl
index a6b499a..399cb02 100644
--- a/library/tk.tcl
+++ b/library/tk.tcl
@@ -701,14 +701,7 @@ if {[tk windowingsystem] eq "aqua"} {
}
}
-if {[tk windowingsystem] eq "aqua"} {
- namespace eval :: {
- namespace export endOfCluster startOfCluster
- }
- namespace eval ::tk:: {
- namespace import ::endOfCluster ::startOfCluster
- }
-} else {
+if {[info commands ::tk::endOfCluster] eq ""} {
proc ::tk::endOfCluster {str start} {
if {$start >= [string length $str]} {
return -1;
@@ -722,6 +715,8 @@ if {[tk windowingsystem] eq "aqua"} {
}
return $start
}
+}
+if {[info commands ::tk::startOfCluster] eq ""} {
proc ::tk::startOfCluster {str start} {
if {$start eq "end"} {
set start [expr {[string length $str]-1}]