Commits

Bert Wesarg  committed 80e6667

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>

  • Participants
  • Parent commits ae6ec61

Comments (0)

Files changed (1)

File lib/browser.tcl

 	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 \