Git development
 help / color / mirror / Atom feed
From: Kacper Kornet <kornet@camk.edu.pl>
To: Paul Mackerras <paulus@samba.org>
Cc: git@vger.kernel.org
Subject: [PATCH] gitk: Preserve Entry class key bindings for SHA id
Date: Thu, 27 Jan 2011 17:06:25 +0100	[thread overview]
Message-ID: <20110127160625.GC519@camk.edu.pl> (raw)

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).

Signed-off-by: Kacper Kornet <kornet@camk.edu.pl>
---
 gitk |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/gitk b/gitk
index 9cbc09d..71eebb2 100755
--- a/gitk
+++ b/gitk
@@ -2389,6 +2389,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}
@@ -2588,12 +2592,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.5

-- 
  Kacper Kornet

                 reply	other threads:[~2011-01-27 16:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110127160625.GC519@camk.edu.pl \
    --to=kornet@camk.edu.pl \
    --cc=git@vger.kernel.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox