]> asedeno.scripts.mit.edu Git - git.git/blobdiff - git-gui.sh
git-gui: Force focus to the diff viewer on mouse click.
[git.git] / git-gui.sh
index 5d418b99c8a3ef0873aad34d0b567ee48f6a064e..ea4136c98b0621264969f47a11f80d24834bf77f 100755 (executable)
@@ -4419,6 +4419,7 @@ bind_button3 $ui_diff "
        }
        tk_popup $ctxm %X %Y
 "
+unset ui_diff_applyhunk
 
 # -- Status Bar
 #
@@ -4471,6 +4472,7 @@ bind $ui_diff <Key-Up>     {catch {%W yview scroll -1 units};break}
 bind $ui_diff <Key-Down>   {catch {%W yview scroll  1 units};break}
 bind $ui_diff <Key-Left>   {catch {%W xview scroll -1 units};break}
 bind $ui_diff <Key-Right>  {catch {%W xview scroll  1 units};break}
+bind $ui_diff <Button-1>   {focus %W}
 
 if {!$single_commit} {
        bind . <$M1B-Key-n> do_create_branch