contrib/hgk
changeset 20764 d9378bfa0af0
parent 20763 0132cbe30c41
child 20934 777daa412e56
--- a/contrib/hgk	Sat Mar 15 15:33:50 2014 +0100
+++ b/contrib/hgk	Sat Mar 15 15:44:51 2014 +0100
@@ -795,8 +795,8 @@
 # set the focus back to the toplevel for any click outside
 # the entry widgets
 proc click {w} {
-    global entries
-    foreach e $entries {
+    global ctext entries
+    foreach e [concat $entries $ctext] {
 	if {$w == $e} return
     }
     focus .
@@ -2546,6 +2546,7 @@
 
 proc selnextline {dir} {
     global selectedline
+    focus .
     if {![info exists selectedline]} return
     set l [expr $selectedline + $dir]
     unmarkmatches
@@ -2583,6 +2584,7 @@
 
 proc goback {} {
     global history historyindex
+    focus .
 
     if {$historyindex > 1} {
 	incr historyindex -1
@@ -2597,6 +2599,7 @@
 
 proc goforw {} {
     global history historyindex
+    focus .
 
     if {$historyindex < [llength $history]} {
 	set cmd [lindex $history $historyindex]