fixed execution order bug that was causing the first two frame numbers to output...
[puredata.git] / packages / patches / add_home_end_to_obj_boxes-0.41.4.patch
blobe280d984e2339653f65225c49529062e8fe515c6
1 Index: u_main.tk
2 ===================================================================
3 --- u_main.tk (revision 9725)
4 +++ u_main.tk (working copy)
5 @@ -3332,7 +3332,7 @@
6 # if {$font < 13} {set fontname [format -*-courier-bold----%d-* $font]}
7 # if {$font >= 13} {set fontname [format -*-courier-----%d-* $font]}
9 - global pd_fontlist
10 + global pd_fontlist pd_nt
11 switch -- $font {
12 8 { set typeface [lindex $pd_fontlist 0] }
13 9 { set typeface [lindex $pd_fontlist 1] }
14 @@ -3346,9 +3346,16 @@
15 36 { set typeface [lindex $pd_fontlist 9] }
18 - $canvasname create text $x $y \
19 - -font $typeface \
20 + $canvasname create text $x $y -font $typeface \
21 -tags $myname -text $text -fill $color -anchor nw
22 + $canvasname bind $myname <Home> [concat $canvasname icursor $myname 0]
23 + $canvasname bind $myname <End> [concat $canvasname icursor $myname end]
24 + if {$pd_nt == 2} { # emacs bindings for Mac OS X
25 + $canvasname bind $myname <Control-a> \
26 + [concat $canvasname icursor $myname 0]
27 + $canvasname bind $myname <Control-e> \
28 + [concat $canvasname icursor $myname end]
29 + }
30 # pd [concat $myname size [$canvasname bbox $myname] \;]