add tests for CommitMatch.Select()
Created by: camdencheek
I'm going to attempt to make the CommitMatch type better represent our domain, but I couldn't find any good tests for calling Select() on CommitMatch, so I added these to lock in expected behavior as I make some changes that affect this.
Note that there seemed to be a few incorrect assumptions about the
format of DiffPreview in selectCommitDiffKind
, but since we don't
really ever use DiffPreview right now (it's redundant with Body), we
weren't seeing the issues. Specifically, there is no need to adjust
the offset because the highlight ranges are adjusted to match added line
from wrapping the diff in a markdown code block.
I tested this locally, and there are no visible changes to highlights when using
select:commit.diff.added/removed
.