summaryrefslogtreecommitdiffstats
path: root/library/entry.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'library/entry.tcl')
-rw-r--r--library/entry.tcl25
1 files changed, 19 insertions, 6 deletions
diff --git a/library/entry.tcl b/library/entry.tcl
index bfbaccf..54f2136 100644
--- a/library/entry.tcl
+++ b/library/entry.tcl
@@ -68,6 +68,11 @@ bind Entry <<PasteSelection>> {
}
}
+bind Entry <<TraverseIn>> {
+ %W selection range 0 end
+ %W icursor end
+}
+
# Standard Motif bindings:
bind Entry <1> {
@@ -203,8 +208,8 @@ bind Entry <Escape> {# nothing}
bind Entry <Return> {# nothing}
bind Entry <KP_Enter> {# nothing}
bind Entry <Tab> {# nothing}
-if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
- bind Entry <Command-KeyPress> {# nothing}
+if {[tk windowingsystem] eq "aqua"} {
+ bind Entry <Command-KeyPress> {# nothing}
}
# On Windows, paste is done using Shift-Insert. Shift-Insert already
@@ -331,7 +336,9 @@ proc ::tk::EntryButton1 {w x} {
set Priv(pressX) $x
$w icursor [EntryClosestGap $w $x]
$w selection from insert
- if {"disabled" ne [$w cget -state]} {focus $w}
+ if {"disabled" ne [$w cget -state]} {
+ focus $w
+ }
}
# ::tk::EntryMouseSelect --
@@ -402,7 +409,9 @@ proc ::tk::EntryMouseSelect {w x} {
proc ::tk::EntryPaste {w x} {
$w icursor [EntryClosestGap $w $x]
catch {$w insert insert [::tk::GetSelection $w PRIMARY]}
- if {"disabled" ne [$w cget -state]} {focus $w}
+ if {"disabled" ne [$w cget -state]} {
+ focus $w
+ }
}
# ::tk::EntryAutoScan --
@@ -418,7 +427,9 @@ proc ::tk::EntryPaste {w x} {
proc ::tk::EntryAutoScan {w} {
variable ::tk::Priv
set x $Priv(x)
- if {![winfo exists $w]} return
+ if {![winfo exists $w]} {
+ return
+ }
if {$x >= [winfo width $w]} {
$w xview scroll 2 units
EntryMouseSelect $w $x
@@ -486,7 +497,9 @@ proc ::tk::EntryBackspace w {
$w delete sel.first sel.last
} else {
set x [expr {[$w index insert] - 1}]
- if {$x >= 0} {$w delete $x}
+ if {$x >= 0} {
+ $w delete $x
+ }
if {[$w index @0] >= [$w index insert]} {
set range [$w xview]
set left [lindex $range 0]