Skip to content

Commit a118470

Browse files
committed
Reuse the current attributes when setting the commit message font
This preserves the font color for Dark mode.
1 parent 38a58c3 commit a118470

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Classes/Controllers/PBGitCommitController.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,10 @@ - (void)awakeFromNib
7676
commitMessageView.repository = self.repository;
7777
commitMessageView.delegate = self;
7878

79-
[commitMessageView setTypingAttributes:[NSDictionary dictionaryWithObject:[NSFont fontWithName:@"Menlo" size:12.0] forKey:NSFontAttributeName]];
80-
79+
NSMutableDictionary *attrs = commitMessageView.typingAttributes.mutableCopy;
80+
attrs[NSFontAttributeName] = [NSFont fontWithName:@"Menlo" size:12.0];
81+
commitMessageView.typingAttributes = attrs;
82+
8183
[unstagedFilesController setFilterPredicate:[NSPredicate predicateWithFormat:@"hasUnstagedChanges == 1"]];
8284
[stagedFilesController setFilterPredicate:[NSPredicate predicateWithFormat:@"hasStagedChanges == 1"]];
8385
[trackedFilesController setFilterPredicate:[NSPredicate predicateWithFormat:@"status > 0"]];

0 commit comments

Comments
 (0)