summaryrefslogtreecommitdiff
path: root/git-gui/lib/blame.tcl
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2008-11-12 21:12:41 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-11-12 21:12:41 -0800
commit0f639abb68b29f6d4cd9b89ecfb66e41136dcfa3 (patch)
treec465f578f933c32dcbd1d8121665be64d6518c23 /git-gui/lib/blame.tcl
parentgit.html: Update the links to stale versions (diff)
parentgit-gui: Request blame metadata in utf-8. (diff)
downloadtgif-0f639abb68b29f6d4cd9b89ecfb66e41136dcfa3.tar.xz
Merge git://repo.or.cz/git-gui
* git://repo.or.cz/git-gui: git-gui: Request blame metadata in utf-8. git-gui: Add the Show SSH Key item to the clone dialog. git-gui: Fix focus transition in the blame viewer.
Diffstat (limited to 'git-gui/lib/blame.tcl')
-rw-r--r--git-gui/lib/blame.tcl18
1 files changed, 13 insertions, 5 deletions
diff --git a/git-gui/lib/blame.tcl b/git-gui/lib/blame.tcl
index 765d08c004..c1cd7f3b92 100644
--- a/git-gui/lib/blame.tcl
+++ b/git-gui/lib/blame.tcl
@@ -321,7 +321,7 @@ constructor new {i_commit i_path i_jump} {
tk_popup $w.ctxm %X %Y
"
bind $i <Shift-Tab> "[list focus $w_cviewer];break"
- bind $i <Tab> "[list focus $w_cviewer];break"
+ bind $i <Tab> "[cb _focus_search $w_cviewer];break"
}
foreach i [concat $w_columns $w_cviewer] {
@@ -337,10 +337,10 @@ constructor new {i_commit i_path i_jump} {
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 <Shift-Tab> "[cb _focus_search $w_file];break"
bind $w_cviewer <Tab> "[list focus $w_file];break"
- bind $w_cviewer <Button-1> [list focus $w_cviewer]
- bind $w_file <Visibility> [list focus $w_file]
+ bind $w_cviewer <Button-1> [list focus $w_cviewer]
+ bind $w_file <Visibility> [cb _focus_search $w_file]
bind $top <F7> [list searchbar::show $finder]
bind $top <Escape> [list searchbar::hide $finder]
bind $top <F3> [list searchbar::find_next $finder]
@@ -382,6 +382,14 @@ constructor new {i_commit i_path i_jump} {
_load $this $i_jump
}
+method _focus_search {win} {
+ if {[searchbar::visible $finder]} {
+ focus [searchbar::editor $finder]
+ } else {
+ focus $win
+ }
+}
+
method _handle_destroy {win} {
if {$win eq $w} {
_kill $this
@@ -551,7 +559,7 @@ method _read_file {fd jump} {
} ifdeleted { catch {close $fd} }
method _exec_blame {cur_w cur_d options cur_s} {
- lappend options --incremental
+ lappend options --incremental --encoding=utf-8
if {$commit eq {}} {
lappend options --contents $path
} else {