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>
This commit is contained in:
parent
ae6ec6124b
commit
80e6667809
@ -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…
Reference in New Issue
Block a user