From 28c504a7dbc9f4d9e630ca1a9373c984028c8e13 Mon Sep 17 00:00:00 2001 From: Nick White Date: Sun, 12 Jan 2014 21:37:31 +0000 Subject: Enable text selection --- tkread | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tkread b/tkread index 3d703f3..c501c04 100755 --- a/tkread +++ b/tkread @@ -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 . {exit} bind . {set drag 1; set lasty -1} bind . {set drag 0} bind . {if {$drag} { doMotion %y } } +bind .t {set drag 0} ;# so text selection can span lines properly -- cgit v1.2.3