git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Preserve Entry class key bindings for SHA id

From
KKKacper Kornet <kornet@camk.edu.pl>
Date
Dec 10, 2010, 13:34 UTC
Message-ID
<20101210133456.GA8517@camk.edu.pl>
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
Message 1 of 1 in “Preserve Entry class key bindings for SHA id”
  1. Preserve Entry class key bindings for SHA idKacper Kornet, Dec 10, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.