summaryrefslogtreecommitdiffstats
path: root/library/text.tcl
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-06-15 20:56:00 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-06-15 20:56:00 (GMT)
commit0df448d72dc5f494bf12f7b51263f5564caf044b (patch)
tree5a393326af3dc0ccaaf6e659939b88a6fb5a7c13 /library/text.tcl
parent8f72212fd698ae61734ebcaff08e59a3781f31f4 (diff)
parenta780a7ac0367c7321e60e836e3694b0b8052e4a2 (diff)
downloadtk-0df448d72dc5f494bf12f7b51263f5564caf044b.zip
tk-0df448d72dc5f494bf12f7b51263f5564caf044b.tar.gz
tk-0df448d72dc5f494bf12f7b51263f5564caf044b.tar.bz2
Merge trunk
Diffstat (limited to 'library/text.tcl')
-rw-r--r--library/text.tcl17
1 files changed, 10 insertions, 7 deletions
diff --git a/library/text.tcl b/library/text.tcl
index e7cf061..9ccf90c 100644
--- a/library/text.tcl
+++ b/library/text.tcl
@@ -38,8 +38,16 @@
# The code below creates the default class bindings for text widgets.
#-------------------------------------------------------------------------
+
+
# Standard Motif bindings:
+bind Text <Map> {
+ if {[tk windowingsystem] eq "aqua"} {
+ ::tk::RegisterServiceWidget %W
+ }
+}
+
bind Text <1> {
tk::TextButton1 %W %x %y
%W tag remove sel 0.0 end
@@ -83,6 +91,7 @@ bind Text <B1-Enter> {
bind Text <ButtonRelease-1> {
tk::CancelRepeat
}
+
bind Text <Control-1> {
%W mark set insert @%x,%y
# An operation that moves the insert mark without making it
@@ -1203,7 +1212,7 @@ proc ::tk::TextScanDrag {w x y} {
}
if {[info exists Priv(mouseMoved)] && $Priv(mouseMoved)} {
$w scan dragto $x $y
- }
+ }
}
# ::tk::TextUndoRedoProcessMarks --
@@ -1274,29 +1283,23 @@ proc ::tk::TextUndoRedoProcessMarks {w} {
# -> further second ranges do not need to be considered
# because ranges were sorted by increasing first index
set j $nUndoMarks
-
} else {
if {[$w compare $ir2 > $ir1]} {
# second range overlaps first range
# -> merge them into a single range
set indices [lreplace $indices end-1 end]
lappend indices $il1 $ir2
-
} else {
# second range is fully included in first range
# -> ignore it
-
}
# in both cases above, the second range shall be
# trimmed out from the list of ranges
set ind [lreplace $ind $j [expr {$j + 1}]]
incr j -2
incr nUndoMarks -2
-
}
-
}
-
}
return $indices