]>
Commit | Line | Data |
---|---|---|
b2c254f3 KK |
1 | From 2ad6d3e9325a39333be0c4b9094e9d5e756dea65 Mon Sep 17 00:00:00 2001 |
2 | From: Kacper <kornet@tuptus> | |
3 | Date: Thu, 9 Dec 2010 18:57:06 +0000 | |
4 | Subject: [PATCH] Preserve Entry class key bindings for SHA id | |
5 | ||
6 | If bind is specified for key without any modifier, then any combination | |
7 | of modifiers may be present in the event. So bind $e $ev "$escript; | |
8 | break" breaks some useful bindings from Entry class (for example | |
9 | Ctrl+k). | |
10 | --- | |
11 | gitk | 10 +++++----- | |
12 | 1 files changed, 5 insertions(+), 5 deletions(-) | |
13 | ||
14 | diff --git gitk-git/gitk gitk-git/gitk | |
15 | index 45e3380..0c6f3af 100755 | |
16 | --- gitk-git/gitk | |
17 | +++ gitk-git/gitk | |
1fc86c76 JP |
18 | @@ -2528,6 +2528,10 @@ |
19 | set ::BM "2" | |
b2c254f3 KK |
20 | } |
21 | ||
22 | + foreach e $entries { | |
23 | + bindtags $e [linsert [bindtags $e] 2 entrybind] | |
24 | + } | |
25 | + | |
1fc86c76 JP |
26 | if {$use_ttk} { |
27 | bind .ctop <Map> { | |
28 | bind %W <Map> {} | |
29 | @@ -2759,12 +2763,8 @@ | |
b2c254f3 KK |
30 | proc bindkey {ev script} { |
31 | global entries | |
32 | bind . $ev $script | |
33 | - set escript [bind Entry $ev] | |
34 | - if {$escript == {}} { | |
1fc86c76 | 35 | - set escript [bind Entry <Key>] |
b2c254f3 KK |
36 | - } |
37 | foreach e $entries { | |
1fc86c76 JP |
38 | - bind $e $ev "$escript; break" |
39 | + bind entrybind $ev "break" | |
b2c254f3 KK |
40 | } |
41 | } | |
42 |