Code

Merge branch 'maint' of git://repo.or.cz/git-gui into maint
[git.git] / git-gui / lib / blame.tcl
index 98687c77daf2f5746b40674abc0e9fac8a0de7ed..1d2caac2835c27280e1d4b9ec58c51b746e2dd01 100644 (file)
@@ -272,6 +272,8 @@ constructor new {i_commit i_path} {
                        set cursorW %W
                        tk_popup $w.ctxm %X %Y
                "
+               bind $i <Shift-Tab> "[list focus $w_cviewer];break"
+               bind $i <Tab>       "[list focus $w_cviewer];break"
        }
 
        foreach i [concat $w_columns $w_cviewer] {
@@ -287,9 +289,10 @@ constructor new {i_commit i_path} {
                bind $i <Control-Key-f> {catch {%W yview scroll  1 pages};break}
        }
 
+       bind $w_cviewer <Shift-Tab> "[list focus $w_file];break"
+       bind $w_cviewer <Tab>       "[list focus $w_file];break"
        bind $w_cviewer <Button-1> [list focus $w_cviewer]
-       bind $top <Visibility> [list focus $top]
-       bind $w_file <Destroy> [list delete_this $this]
+       bind $w_file    <Visibility> [list focus $w_file]
 
        grid configure $w.header -sticky ew
        grid configure $w.file_pane -sticky nsew
@@ -484,7 +487,11 @@ method _read_file {fd jump} {
 } ifdeleted { catch {close $fd} }
 
 method _exec_blame {cur_w cur_d options cur_s} {
-       set cmd [list nice git blame]
+       set cmd [list]
+       if {![is_Windows] || [is_Cygwin]} {
+               lappend cmd nice
+       }
+       lappend cmd git blame
        set cmd [concat $cmd $options]
        lappend cmd --incremental
        if {$commit eq {}} {
@@ -540,6 +547,10 @@ method _read_blame {fd cur_w cur_d cur_s} {
                        set a_name {}
                        catch {set a_name $header($cmit,author)}
                        while {$a_name ne {}} {
+                               if {$author_abbr ne {}
+                                       && [string index $a_name 0] eq {'}} {
+                                       regsub {^'[^']+'\s+} $a_name {} a_name
+                               }
                                if {![regexp {^([[:upper:]])} $a_name _a]} break
                                append author_abbr $_a
                                unset _a