git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] Preserve Entry class key bindings for SHA id
@ 2010-12-10 13:34 Kacper Kornet
  0 siblings, 0 replies; only message in thread
From: Kacper Kornet @ 2010-12-10 13:34 UTC (permalink / raw)
  To: git; +Cc: paulus

If bind is specified for key without any modifier, then any combination
of modifiers may be present in the event. So bind $e $ev "$escript;
break" breaks some useful bindings from Entry class (for example
Ctrl+k).
---
 gitk |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/gitk b/gitk
index 45e3380..0c6f3af 100755
--- a/gitk
+++ b/gitk
@@ -2365,6 +2365,10 @@ proc makewindow {} {
         }
     }
 
+    foreach e $entries {
+        bindtags $e [linsert [bindtags $e] 2 entrybind]
+    }
+
     bind .pwbottom <Configure> {resizecdetpanes %W %w}
     pack .ctop -fill both -expand 1
     bindall <1> {selcanvline %W %x %y}
@@ -2563,12 +2567,8 @@ proc scrollcanv {cscroll f0 f1} {
 proc bindkey {ev script} {
     global entries
     bind . $ev $script
-    set escript [bind Entry $ev]
-    if {$escript == {}} {
-	set escript [bind Entry <Key>]
-    }
     foreach e $entries {
-	bind $e $ev "$escript; break"
+	bind entrybind $ev "break"
     }
 }
 
-- 
1.7.3.3


-- 
  Kacper Kornet

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-12-10 14:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-10 13:34 [PATCH] Preserve Entry class key bindings for SHA id Kacper Kornet

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).