private IChangeBlob CreateNewBlob(LineChangeType type, ChangeSection section) { IChangeBlob blob; if (type == LineChangeType.Normal) { blob = new NormalBlob(); } else { blob = new AddRemoveBlob(); } section.changeBlobs.Add(blob); return(blob); }
private void ScrollToFirstChange() { if (changeSections == null) { return; } foreach (var changeSection in changeSections) { AddRemoveBlob firstChange = (AddRemoveBlob)changeSection.changeBlobs.FirstOrDefault(b => b is AddRemoveBlob); if (firstChange != null) { scrollVertical = Mathf.Max((changeSection.addedStartLine - 8), 0) * EditorGUIUtility.singleLineHeight; return; } } }