From: Shawn O. Pearce Date: Thu, 25 Jan 2007 17:57:57 +0000 (-0500) Subject: git-gui: Force focus to the diff viewer on mouse click. X-Git-Tag: gitgui-0.6.0~53 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=23effa79f7697cd27f04cb6edc9680e11e15f02a;p=git.git git-gui: Force focus to the diff viewer on mouse click. Apparently a "feature" of Tcl/Tk on Mac OS X is that a disabled text widget cannot receive focus or receive a selection within it. This makes the diff viewer almost useless on that platform as you cannot select individual parts of the buffer. Now we force focus into the diff viewer when its clicked on with button 1. This works around the feature and allows selection to work within the viewer just like it does on other less sane systems, like Microsoft Windows. Signed-off-by: Shawn O. Pearce --- diff --git a/git-gui.sh b/git-gui.sh index f587f31a2..ea4136c98 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -4472,6 +4472,7 @@ bind $ui_diff {catch {%W yview scroll -1 units};break} bind $ui_diff {catch {%W yview scroll 1 units};break} bind $ui_diff {catch {%W xview scroll -1 units};break} bind $ui_diff {catch {%W xview scroll 1 units};break} +bind $ui_diff {focus %W} if {!$single_commit} { bind . <$M1B-Key-n> do_create_branch