diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2006-11-11 20:00:35 -0500 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2006-11-12 00:16:03 -0500 |
commit | 62aac80b133de4fa004d90d27a97f574aec9d02d (patch) | |
tree | ee5f724caf4b33214d690ea09102b8129d5aa33b /git-gui | |
parent | git-gui: Misc. formatting cleanups. (diff) | |
download | tgif-62aac80b133de4fa004d90d27a97f574aec9d02d.tar.xz |
git-gui: Misc. bug fixes for mouse click crashes.
Make sure the file_lists array has both elements set at all times,
otherwise we get Tcl errors during mouse clicks in the file list
areas due to the list not being defined.
Also added M1-A as a keyboard binding within the console window
text area. This lets users select all text easily and copy it
to the clipboard.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-gui')
-rwxr-xr-x | git-gui | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -960,7 +960,9 @@ proc display_all_files {} { $ui_index delete 0.0 end $ui_other delete 0.0 end - array unset file_lists + set file_lists($ui_index) [list] + set file_lists($ui_other) [list] + foreach path [lsort [array names file_states]] { set s $file_states($path) set m [lindex $s 0] @@ -1273,7 +1275,7 @@ proc new_console {short_title long_title} { proc console_init {w} { global console_cr console_data - global gitdir appname font_ui font_diff + global gitdir appname font_ui font_diff M1B set console_cr($w) 1.0 toplevel $w @@ -1306,6 +1308,8 @@ proc console_init {w} { -command "destroy $w" pack $w.ok -side bottom + bind $w.m.t <$M1B-Key-a> "$w.m.t tag add sel 0.0 end;break" + bind $w.m.t <$M1B-Key-A> "$w.m.t tag add sel 0.0 end;break" bind $w <Visibility> "focus $w" wm title $w "$appname ([lindex [file split \ [file normalize [file dirname $gitdir]]] \ @@ -1900,7 +1904,10 @@ foreach i [list $ui_index $ui_other] { bind $i <Button-3> {click %W %x %y 3 %X %Y; break} bind $i <ButtonRelease-1> {unclick %W %x %y; break} } -unset i M1B M1T +unset i + +set file_lists($ui_index) [list] +set file_lists($ui_other) [list] wm title . "$appname ([file normalize [file dirname $gitdir]])" focus -force $ui_comm |