diff options
author | Bert Wesarg <bert.wesarg@googlemail.com> | 2010-11-23 08:37:50 +0100 |
---|---|---|
committer | Pat Thoyts <patthoyts@users.sourceforge.net> | 2011-10-19 14:13:15 +0100 |
commit | 80e66678092700354f8cfc334eab62861d509201 (patch) | |
tree | 73527340e101d319f4bf76b6cd017a1acc32ea17 | |
parent | ae6ec6124bb96157ca96bc90831b4874e8ad6789 (diff) | |
download | git-80e66678092700354f8cfc334eab62861d509201.tar.gz |
git-gui: fix display of path in browser title
Ensure the browser path is shown on the title with a / suffix and escape
any backslashes or newlines in path elements before display.
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
-rw-r--r-- | lib/browser.tcl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/browser.tcl b/lib/browser.tcl index a8c6223511..0328338fda 100644 --- a/lib/browser.tcl +++ b/lib/browser.tcl @@ -26,8 +26,14 @@ constructor new {commit {path {}}} { wm withdraw $top wm title $top [append "[appname] ([reponame]): " [mc "File Browser"]] + if {$path ne {}} { + if {[string index $path end] ne {/}} { + append path / + } + } + set browser_commit $commit - set browser_path $browser_commit:$path + set browser_path "$browser_commit:[escape_path $path]" ${NS}::label $w.path \ -textvariable @browser_path \ |