[PATCH] gitk: Enable selected patch text on Windows
[gitweb.git] / gitk
diff --git a/gitk b/gitk
index 44b04f017a0cadc56a1f3896d1d3d84657b21c58..32206a68f055f118daa46f7bfbbcdeedabaf943a 100755 (executable)
--- a/gitk
+++ b/gitk
@@ -964,8 +964,8 @@ proc bindkey {ev script} {
 # 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 .
@@ -4600,6 +4600,7 @@ proc sellastline {} {
 
 proc selnextline {dir} {
     global selectedline
+    focus .
     if {![info exists selectedline]} return
     set l [expr {$selectedline + $dir}]
     unmarkmatches
@@ -4680,6 +4681,7 @@ proc godo {elt} {
 
 proc goback {} {
     global history historyindex
+    focus .
 
     if {$historyindex > 1} {
        incr historyindex -1
@@ -4693,6 +4695,7 @@ proc goback {} {
 
 proc goforw {} {
     global history historyindex
+    focus .
 
     if {$historyindex < [llength $history]} {
        set cmd [lindex $history $historyindex]