diff options
author | Nick White <git@njw.me.uk> | 2014-01-12 21:37:31 +0000 |
---|---|---|
committer | Nick White <git@njw.me.uk> | 2014-01-12 21:37:31 +0000 |
commit | 28c504a7dbc9f4d9e630ca1a9373c984028c8e13 (patch) | |
tree | ef8bf9acad51cb358c116147f326c3584d0edbea | |
parent | de1a5444db708f96068c626a94ba347a3fe58130 (diff) | |
download | tkread-28c504a7dbc9f4d9e630ca1a9373c984028c8e13.tar.bz2 tkread-28c504a7dbc9f4d9e630ca1a9373c984028c8e13.zip |
Enable text selection
-rwxr-xr-x | tkread | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -149,7 +149,7 @@ if { [lsearch [font families] "$fontfamily"] == -1 } { set fontfamily Times } . configure -bg $outercolour -text .t -font "{$fontfamily} $fontsize" -wrap word -width 64 -padx [expr $fontsize * 3] -bg $bgcolour -fg $textcolour -relief flat -inactiveselectbackground {} -cursor {} +text .t -font "{$fontfamily} $fontsize" -wrap word -width 64 -padx [expr $fontsize * 3] -bg $bgcolour -fg $textcolour -relief flat pack .t -expand yes -fill y set text [read stdin] foreach arg $::argv { @@ -188,3 +188,4 @@ bind . <q> {exit} bind . <ButtonPress-1> {set drag 1; set lasty -1} bind . <ButtonRelease-1> {set drag 0} bind . <Motion> {if {$drag} { doMotion %y } } +bind .t <Motion> {set drag 0} ;# so text selection can span lines properly |