public void MoveToChange(DiffViewModel currentDiffViewModel, int indexModifier)
        {
            var diffViewModelIndex = DiffViewModels.IndexOf(currentDiffViewModel) + indexModifier;
            var diffViewModel      = DiffViewModels[diffViewModelIndex];

            MarginCore.MoveToChange(diffViewModel.LineNumber);

            ((EditorDiffViewModel)currentDiffViewModel).ShowPopup = false;
        }
        private void MoveToChange(DiffViewModel currentDiffViewModel, int indexModifier)
        {
            var diffViewModelIndex = DiffViewModels.IndexOf(currentDiffViewModel) + indexModifier;
            var diffViewModel      = DiffViewModels[diffViewModelIndex];
            var diffLine           = _textView.TextSnapshot.GetLineFromLineNumber(diffViewModel.LineNumber);

            currentDiffViewModel.ShowPopup = false;

            _textView.VisualElement.Focus();
            _textView.Caret.MoveTo(diffLine.Start);
            _textView.Caret.EnsureVisible();
        }
 private bool NextChangeCanExecute(DiffViewModel currentEditorDiffViewModel)
 {
     return(DiffViewModels.IndexOf(currentEditorDiffViewModel) < (DiffViewModels.Count - 1));
 }
 private bool PreviousChangeCanExecute(DiffViewModel currentEditorDiffViewModel)
 {
     return(DiffViewModels.IndexOf(currentEditorDiffViewModel) > 0);
 }