Skip to content

Commit f25aad8

Browse files
nrileypieter
authored andcommitted
Don't disturb editing state when inserting "Signed-off-by" line.
1 parent 9fff83a commit f25aad8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

PBGitCommitController.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@ - (IBAction)signOff:(id)sender
5757
[repository.config valueForKeyPath:@"user.email"]];
5858

5959
if([commitMessageView.string rangeOfString:SOBline].location == NSNotFound) {
60+
NSArray *selectedRanges = [commitMessageView selectedRanges];
6061
commitMessageView.string = [NSString stringWithFormat:@"%@\n\n%@",
6162
commitMessageView.string, SOBline];
63+
[commitMessageView setSelectedRanges: selectedRanges];
6264
}
6365
}
6466

0 commit comments

Comments
 (0)