summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2014-01-12 21:37:31 +0000
committerNick White <git@njw.me.uk>2014-01-12 21:37:31 +0000
commit28c504a7dbc9f4d9e630ca1a9373c984028c8e13 (patch)
treeef8bf9acad51cb358c116147f326c3584d0edbea
parentde1a5444db708f96068c626a94ba347a3fe58130 (diff)
downloadtkread-28c504a7dbc9f4d9e630ca1a9373c984028c8e13.tar.bz2
tkread-28c504a7dbc9f4d9e630ca1a9373c984028c8e13.zip
Enable text selection
-rwxr-xr-xtkread3
1 files changed, 2 insertions, 1 deletions
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 . <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