Skip to content

Commit 48b8d2b

Browse files
committed
git-gui: Allow users to set font weights to bold
Previously we allowed users to tweak their font weight to be bold by setting it manually in their ~/.gitconfig prior to starting git-gui. This was broken in ae0754a when Simon set the font weight to normal by default, overridding whatever we found from the ~/.gitconfig file. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
1 parent 6ea1079 commit 48b8d2b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

git-gui.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,8 +551,15 @@ proc apply_config {} {
551551
set name [lindex $option 0]
552552
set font [lindex $option 1]
553553
if {[catch {
554+
set need_weight 1
554555
foreach {cn cv} $repo_config(gui.$name) {
555-
font configure $font $cn $cv -weight normal
556+
if {$cn eq {-weight}} {
557+
set need_weight 0
558+
}
559+
font configure $font $cn $cv
560+
}
561+
if {$need_weight} {
562+
font configure $font -weight normal
556563
}
557564
} err]} {
558565
error_popup [strcat [mc "Invalid font specified in %s:" "gui.$name"] "\n\n$err"]

0 commit comments

Comments
 (0)