summaryrefslogtreecommitdiff
path: root/gitk
diff options
context:
space:
mode:
authorMark Levedahl <mdl123@verizon.net>2007-08-08 01:40:34 (GMT)
committerPaul Mackerras <paulus@samba.org>2007-08-12 07:29:55 (GMT)
commitbd441de4df68c4144425b1c18d323fd90f3f9617 (patch)
tree22993af7ce064b3cc6bb31c03a2f9a683f62e7d8 /gitk
parent67a4f1a7f5c778ffa23d1e562feb4cc6d52c9414 (diff)
downloadgit-bd441de4df68c4144425b1c18d323fd90f3f9617.zip
git-bd441de4df68c4144425b1c18d323fd90f3f9617.tar.gz
git-bd441de4df68c4144425b1c18d323fd90f3f9617.tar.bz2
[PATCH] gitk: Enable selected patch text on Windows
On windows, mouse input follows the keyboard focus, so to allow selecting text from the patch canvas we must not shift focus back to the top level. This change has no negative impact on X, so we don't explicitly test for Win32 on this change. This provides similar selection capability as already available using X-Windows. Signed-off-by: Mark Levedahl <mdl123@verizon.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'gitk')
-rwxr-xr-xgitk7
1 files changed, 5 insertions, 2 deletions
diff --git a/gitk b/gitk
index 44b04f0..32206a6 100755
--- 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]