threads / patch / 35968

patchgitk: replace SHA1 entry field on keyboard paste

Subject: [PATCH] gitk: replace SHA1 entry field on keyboard paste

## tl;dr

One message between Feb 27, 2014 and Feb 27, 2014. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Ilya Bobyr· Feb 27, 2014, 09:56 UTC · lore

We already replace old SHA with the clipboard content for the mouse paste event. It seems reasonable to do the same when pasting from keyboard.

Signed-off-by: Ilya Bobyr <ilya.bobyr@gmail.com>
---
  gitk-git/gitk |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
Show changes to gitk-git/gitk +1 −1
diff --git a/gitk-git/gitk b/gitk-git/gitk
index 90764e8..2f58bcf 100755
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -2585,6 +2585,7 @@ proc makewindow {} {
      bind $fstring <Key-Return> {dofind 1 1}
      bind $sha1entry <Key-Return> {gotocommit; break}
      bind $sha1entry <<PasteSelection>> clearsha1
+    bind $sha1entry <<Paste>> clearsha1
      bind $cflist <1> {sel_flist %W %x %y; break}
      bind $cflist <B1-Motion> {sel_flist %W %x %y; break}
      bind $cflist <ButtonRelease-1> {treeclick %W %x %y}
--
1.7.9

← back to recent threads