Browse Source

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>
maint
Bert Wesarg 14 years ago committed by Pat Thoyts
parent
commit
80e6667809
  1. 8
      lib/browser.tcl

8
lib/browser.tcl

@ -26,8 +26,14 @@ constructor new {commit {path {}}} { @@ -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 \

Loading…
Cancel
Save