示例#1
0
        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);
        }
示例#2
0
 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;
         }
     }
 }